1# Makefile.am for the SASL plugins
2# Rob Siemborski
3# Rob Earhart
4# $Id: Makefile.am,v 1.86 2011/09/05 14:18:10 murch Exp $
5#
6################################################################
7# Copyright (c) 2000 Carnegie Mellon University.  All rights reserved.
8#
9# Redistribution and use in source and binary forms, with or without
10# modification, are permitted provided that the following conditions
11# are met:
12#
13# 1. Redistributions of source code must retain the above copyright
14#    notice, this list of conditions and the following disclaimer.
15#
16# 2. Redistributions in binary form must reproduce the above copyright
17#    notice, this list of conditions and the following disclaimer in
18#    the documentation and/or other materials provided with the
19#    distribution.
20#
21# 3. The name "Carnegie Mellon University" must not be used to
22#    endorse or promote products derived from this software without
23#    prior written permission. For permission or any other legal
24#    details, please contact
25#      Office of Technology Transfer
26#      Carnegie Mellon University
27#      5000 Forbes Avenue
28#      Pittsburgh, PA  15213-3890
29#      (412) 268-4387, fax: (412) 268-7395
30#      tech-transfer@andrew.cmu.edu
31#
32# 4. Redistributions of any form whatsoever must retain the following
33#    acknowledgment:
34#    "This product includes software developed by Computing Services
35#     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
36#
37# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
38# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
39# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
40# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
41# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
42# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
43# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
44#
45################################################################
46
47# Library version info - here at the top, for sanity
48# See <http://www.gnu.org/software/libtool/manual/libtool.html#Versioning>
49# CURRENT:REVISION:AGE
50plugin_version = 3:0:0
51
52AM_CPPFLAGS=-DLIBSASL_EXPORTS=1 -I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_srcdir)/common -I$(top_builddir)/include
53AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir) -version-info $(plugin_version) -no-undefined
54
55if BUILD_LIBOBJ
56COMPAT_OBJS = $(top_builddir)/lib/libobj.la
57endif
58PLUGIN_COMMON_OBJS = $(top_builddir)/common/libplugin_common.la
59CRYPTO_COMPAT_OBJS = $(top_builddir)/common/libcrypto_compat.la
60
61EXTRA_DIST = makeinit.sh NTMakefile
62noinst_SCRIPTS = makeinit.sh
63
64LIB_MYSQL = @LIB_MYSQL@
65
66plugindir = @plugindir@
67plugin_LTLIBRARIES = @SASL_MECHS@
68
69EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \
70	libgs2.la libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \
71	libscram.la libntlm.la libpassdss.la libsasldb.la libsql.la libldapdb.la
72
73libplain_la_SOURCES = plain.c plain_init.c
74libplain_la_DEPENDENCIES = $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
75libplain_la_LIBADD = $(PLAIN_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
76
77libanonymous_la_SOURCES = anonymous.c anonymous_init.c
78libanonymous_la_DEPENDENCIES = $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
79libanonymous_la_LIBADD = $(LIB_SOCKET) $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
80
81libkerberos4_la_SOURCES = kerberos4.c kerberos4_init.c
82libkerberos4_la_DEPENDENCIES = $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
83libkerberos4_la_LIBADD = $(SASL_KRB_LIB) $(LIB_SOCKET) $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
84
85libgs2_la_SOURCES = gs2.c gs2_init.c gs2_token.c gs2_token.h
86libgs2_la_DEPENDENCIES = $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
87libgs2_la_LIBADD = $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
88
89libgssapiv2_la_SOURCES = gssapi.c gssapiv2_init.c
90libgssapiv2_la_DEPENDENCIES = $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
91libgssapiv2_la_LIBADD = $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
92
93libcrammd5_la_SOURCES = cram.c crammd5_init.c
94libcrammd5_la_DEPENDENCIES = $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
95libcrammd5_la_LIBADD = $(LIB_SOCKET) $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
96
97libdigestmd5_la_SOURCES = digestmd5.c digestmd5_init.c
98libdigestmd5_la_DEPENDENCIES = $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
99libdigestmd5_la_LIBADD = $(LIB_DES) $(LIB_SOCKET) $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
100
101libscram_la_SOURCES = scram.c scram_init.c
102libscram_la_DEPENDENCIES = $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
103libscram_la_LIBADD = $(SCRAM_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
104
105liblogin_la_SOURCES = login.c login_init.c
106liblogin_la_DEPENDENCIES = $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
107liblogin_la_LIBADD = $(PLAIN_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
108
109libsrp_la_SOURCES = srp.c srp_init.c
110libsrp_la_DEPENDENCIES = $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS) $(CRYPTO_COMPAT_OBJS)
111libsrp_la_LIBADD = $(SRP_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS) $(CRYPTO_COMPAT_OBJS)
112
113libotp_la_SOURCES = otp.c otp_init.c otp.h
114libotp_la_DEPENDENCIES = $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
115libotp_la_LIBADD = $(OTP_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
116
117libntlm_la_SOURCES = ntlm.c ntlm_init.c
118libntlm_la_DEPENDENCIES = $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS) $(CRYPTO_COMPAT_OBJS)
119libntlm_la_LIBADD = $(NTLM_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS) $(CRYPTO_COMPAT_OBJS)
120
121libpassdss_la_SOURCES = passdss.c passdss_init.c
122libpassdss_la_DEPENDENCIES = $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS) $(CRYPTO_COMPAT_OBJS)
123libpassdss_la_LIBADD = $(PASSDSS_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS) $(CRYPTO_COMPAT_OBJS)
124
125# Auxprop Plugins
126libsasldb_la_SOURCES = sasldb.c sasldb_init.c
127libsasldb_la_DEPENDENCIES = $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
128libsasldb_la_LIBADD = ../sasldb/libsasldb.la $(SASL_DB_LIB) $(LIB_SOCKET) $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
129
130libldapdb_la_SOURCES = ldapdb.c ldapdb_init.c
131libldapdb_la_DEPENDENCIES = $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
132libldapdb_la_LIBADD = $(LIB_LDAP) $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
133
134libsql_la_SOURCES = sql.c sql_init.c
135libsql_la_LDFLAGS = $(LIB_MYSQL) $(LIB_PGSQL) $(LIB_SQLITE) $(LIB_SQLITE3) \
136	$(AM_LDFLAGS)
137libsql_la_DEPENDENCIES = $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
138libsql_la_LIBADD = $(COMPAT_OBJS) $(PLUGIN_COMMON_OBJS)
139
140
141# Instructions for making the _init files
142
143init_src=anonymous_init.c crammd5_init.c digestmd5_init.c scram_init.c gs2_init.c gssapiv2_init.c \
144kerberos4_init.c login_init.c plain_init.c srp_init.c otp_init.c ntlm_init.c \
145passdss_init.c sasldb_init.c sql_init.c ldapdb_init.c
146
147
148CLEANFILES=$(init_src)
149
150${init_src}: $(srcdir)/makeinit.sh
151	$(SHELL) $(srcdir)/makeinit.sh $@
152