HEIMDAL: move code from source4/heimdal* to third_party/heimdal*
[Samba.git] / third_party / heimdal / kdc / Makefile.am
blob54382a842bf43a46e30bf82fdea0deba2153ea67
1 # $Id$
3 include $(top_srcdir)/Makefile.am.common
5 AM_CPPFLAGS += $(INCLUDE_libintl) $(INCLUDE_openssl_crypto) -I$(srcdir)/../lib/krb5
7 lib_LTLIBRARIES = simple_csr_authorizer.la  ipc_csr_authorizer.la \
8                   libkdc.la negotiate_token_validator.la
10 if HAVE_CJWT
11 lib_LTLIBRARIES += cjwt_token_validator.la
12 endif
13 if OPENLDAP
14 lib_LTLIBRARIES += altsecid_gss_preauth_authorizer.la
15 endif
18 bin_PROGRAMS = string2key
20 sbin_PROGRAMS = kstash
22 libexec_PROGRAMS = hprop hpropd kdc digest-service \
23                    test_token_validator test_csr_authorizer test_kdc_ca
25 noinst_PROGRAMS = kdc-replay kdc-tester
27 man_MANS = bx509d.8 httpkadmind.8 kdc.8 kstash.8 hprop.8 hpropd.8 string2key.8
29 hprop_SOURCES = hprop.c mit_dump.c hprop.h
30 hpropd_SOURCES = hpropd.c hprop.h
32 kstash_SOURCES = kstash.c headers.h
34 string2key_SOURCES = string2key.c headers.h
36 if HAVE_MICROHTTPD
37 bx509d_SOURCES = bx509d.c
38 bx509d_AM_CPPFLAGS = $(AM_CPPFLAGS) $(MICROHTTPD_CFLAGS)
39 bx509d_LDADD =  -ldl \
40                  $(top_builddir)/lib/hdb/libhdb.la \
41                  libkdc.la \
42                  $(MICROHTTPD_LIBS) \
43                  $(LIB_roken) \
44                  $(LIB_heimbase) \
45                  $(top_builddir)/lib/sl/libsl.la \
46                  $(top_builddir)/lib/asn1/libasn1.la \
47                  $(top_builddir)/lib/krb5/libkrb5.la \
48                  $(top_builddir)/lib/hx509/libhx509.la \
49                  $(top_builddir)/lib/gssapi/libgssapi.la
50 libexec_PROGRAMS += bx509d
52 httpkadmind_SOURCES = httpkadmind.c
53 httpkadmind_AM_CPPFLAGS = $(AM_CPPFLAGS) $(MICROHTTPD_CFLAGS)
54 httpkadmind_LDADD =     -ldl \
55                  $(top_builddir)/lib/hdb/libhdb.la \
56                  $(top_builddir)/lib/kadm5/libkadm5clnt.la \
57                  $(top_builddir)/lib/kadm5/libkadm5srv.la \
58                  libkdc.la \
59                  $(MICROHTTPD_LIBS) \
60                  $(LIB_roken) \
61                  $(LIB_heimbase) \
62                  $(LIB_hcrypto) \
63                  $(top_builddir)/lib/sl/libsl.la \
64                  $(top_builddir)/lib/asn1/libasn1.la \
65                  $(top_builddir)/lib/krb5/libkrb5.la \
66                  $(top_builddir)/lib/hx509/libhx509.la \
67                  $(top_builddir)/lib/gssapi/libgssapi.la
68 libexec_PROGRAMS += httpkadmind
69 endif
71 digest_service_SOURCES = \
72         digest-service.c
74 kdc_SOURCES = connect.c \
75         config.c        \
76         announce.c      \
77         main.c
79 kdc_tester_SOURCES = \
80         config.c        \
81         kdc-tester.c
83 test_token_validator_SOURCES = test_token_validator.c
84 test_csr_authorizer_SOURCES = test_csr_authorizer.c
85 test_kdc_ca_SOURCES = test_kdc_ca.c
87 # Token plugins (for bx509d)
88 if HAVE_CJWT
89 cjwt_token_validator_la_SOURCES = cjwt_token_validator.c
90 cjwt_token_validator_la_CFLAGS = $(CJSON_CFLAGS) $(CJWT_CFLAGS)
91 cjwt_token_validator_la_LDFLAGS = -module $(CJSON_LIBS) $(CJWT_LIBS)
92 endif
94 negotiate_token_validator_la_SOURCES = negotiate_token_validator.c
95 negotiate_token_validator_la_LDFLAGS = -module $(LIB_gssapi)
96 # CSR Authorizer plugins (for kdc/kx509 and bx509d)
97 simple_csr_authorizer_la_SOURCES = simple_csr_authorizer.c
98 simple_csr_authorizer_la_LDFLAGS = -module
99 ipc_csr_authorizer_la_SOURCES = ipc_csr_authorizer.c
100 ipc_csr_authorizer_la_LDFLAGS = -module \
101                                 $(top_builddir)/lib/krb5/libkrb5.la \
102                                 $(top_builddir)/lib/hx509/libhx509.la \
103                                 $(top_builddir)/lib/ipc/libheim-ipcc.la \
104                                 $(top_builddir)/lib/roken/libroken.la
106 # GSS-API authorization plugins
107 if OPENLDAP
108 altsecid_gss_preauth_authorizer_la_SOURCES = altsecid_gss_preauth_authorizer.c
109 altsecid_gss_preauth_authorizer_la_LDFLAGS = -module \
110                                              $(top_builddir)/lib/gssapi/libgssapi.la \
111                                              $(top_builddir)/lib/krb5/libkrb5.la \
112                                              $(LIB_openldap)
113 endif
115 libkdc_la_SOURCES =             \
116         default_config.c        \
117         ca.c                    \
118         set_dbinfo.c            \
119         digest.c                \
120         fast.c                  \
121         kdc_locl.h              \
122         kerberos5.c             \
123         krb5tgs.c               \
124         pkinit.c                \
125         pkinit-ec.c             \
126         log.c                   \
127         misc.c                  \
128         kx509.c                 \
129         token_validator.c       \
130         csr_authorizer.c        \
131         process.c               \
132         windc.c                 \
133         gss_preauth.c           \
134         rx.h
136 KDC_PROTOS = $(srcdir)/kdc-protos.h $(srcdir)/kdc-private.h
138 ALL_OBJECTS  = $(kdc_OBJECTS)
139 ALL_OBJECTS += $(kdc_replay_OBJECTS)
140 ALL_OBJECTS += $(kdc_tester_OBJECTS)
141 ALL_OBJECTS += $(test_token_validator_OBJECTS)
142 ALL_OBJECTS += $(test_csr_authorizer_OBJECTS)
143 ALL_OBJECTS += $(test_kdc_ca_OBJECTS)
144 ALL_OBJECTS += $(libkdc_la_OBJECTS)
145 ALL_OBJECTS += $(string2key_OBJECTS)
146 ALL_OBJECTS += $(kstash_OBJECTS)
147 ALL_OBJECTS += $(hprop_OBJECTS)
148 ALL_OBJECTS += $(hpropd_OBJECTS)
149 ALL_OBJECTS += $(digest_service_OBJECTS)
150 ALL_OBJECTS += $(bx509d_OBJECTS)
151 ALL_OBJECTS += $(httpkadmind_OBJECTS)
152 ALL_OBJECTS += $(cjwt_token_validator_la_OBJECTS)
153 ALL_OBJECTS += $(simple_csr_authorizer_la_OBJECTS)
154 ALL_OBJECTS += $(test_token_validator_OBJECTS)
155 ALL_OBJECTS += $(test_csr_authorizer_OBJECTS)
156 ALL_OBJECTS += $(test_kdc_ca_OBJECTS)
157 ALL_OBJECTS += $(ipc_csr_authorizer_la_OBJECTS)
158 ALL_OBJECTS += $(negotiate_token_validator_la_OBJECTS)
160 $(ALL_OBJECTS): $(KDC_PROTOS)
162 libkdc_la_LDFLAGS = -version-info 2:0:0
164 if versionscript
165 libkdc_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
166 endif
168 $(libkdc_la_OBJECTS): $(srcdir)/version-script.map
170 $(srcdir)/kdc-protos.h: $(libkdc_la_SOURCES)
171         cd $(srcdir) && perl ../cf/make-proto.pl -q -P comment -o kdc-protos.h $(libkdc_la_SOURCES) || rm -f kdc-protos.h
173 $(srcdir)/kdc-private.h: $(libkdc_la_SOURCES)
174         cd $(srcdir) && perl ../cf/make-proto.pl -q -P comment -p kdc-private.h $(libkdc_la_SOURCES) || rm -f kdc-private.h
177 hprop_LDADD = \
178         $(top_builddir)/lib/hdb/libhdb.la \
179         $(top_builddir)/lib/krb5/libkrb5.la \
180         $(LIB_kdb)  \
181         $(LIB_hcrypto) \
182         $(top_builddir)/lib/asn1/libasn1.la \
183         $(LIB_roken) \
184         $(DB3LIB) $(DB1LIB) $(LMDBLIB) $(NDBMLIB)
186 hpropd_LDADD = \
187         $(top_builddir)/lib/hdb/libhdb.la \
188         $(top_builddir)/lib/krb5/libkrb5.la \
189         $(LIB_kdb)  \
190         $(LIB_hcrypto) \
191         $(top_builddir)/lib/asn1/libasn1.la \
192         $(LIB_roken) \
193         $(DB3LIB) $(DB1LIB) $(LMDBLIB) $(NDBMLIB)
195 if PKINIT
196 LIB_pkinit = $(top_builddir)/lib/hx509/libhx509.la
197 endif
199 libkdc_la_LIBADD = \
200         $(LIB_pkinit) \
201         $(top_builddir)/lib/hdb/libhdb.la \
202         $(top_builddir)/lib/krb5/libkrb5.la \
203         $(top_builddir)/lib/gssapi/libgssapi.la \
204         $(top_builddir)/lib/gss_preauth/libgss_preauth.la \
205         $(LIB_kdb)  \
206         $(top_builddir)/lib/ntlm/libheimntlm.la \
207         $(LIB_hcrypto) \
208         $(LIB_openssl_crypto) \
209         $(top_builddir)/lib/asn1/libasn1.la \
210         $(LIB_roken) \
211         $(DB3LIB) $(DB1LIB) $(LMDBLIB) $(NDBMLIB)
213 LDADD = $(top_builddir)/lib/hdb/libhdb.la \
214         $(top_builddir)/lib/krb5/libkrb5.la \
215         $(LIB_hcrypto) \
216         $(top_builddir)/lib/asn1/libasn1.la \
217         $(LIB_roken) \
218         $(DB3LIB) $(DB1LIB) $(LMDBLIB) $(NDBMLIB)
220 kdc_LDADD = libkdc.la $(LDADD) $(LIB_pidfile) $(CAPNG_LIBS)
222 if FRAMEWORK_SECURITY
223 kdc_LDFLAGS = -framework SystemConfiguration -framework CoreFoundation
224 endif
225 kdc_CFLAGS = $(CAPNG_CFLAGS)
227 digest_service_LDADD = \
228         libkdc.la \
229         $(top_builddir)/lib/ntlm/libheimntlm.la \
230         $(top_builddir)/lib/ipc/libheim-ipcs.la \
231         $(LDADD) $(LIB_pidfile)
232 kdc_replay_LDADD = libkdc.la $(LDADD) $(LIB_pidfile)
233 kdc_tester_LDADD = libkdc.la $(LDADD) $(LIB_pidfile) $(LIB_heimbase)
234 test_token_validator_LDADD = libkdc.la $(LDADD) $(LIB_pidfile) $(LIB_heimbase) $(LIB_gssapi)
235 test_csr_authorizer_LDADD = libkdc.la $(top_builddir)/lib/hx509/libhx509.la $(LDADD) $(LIB_pidfile) $(LIB_heimbase)
236 test_kdc_ca_LDADD = libkdc.la $(top_builddir)/lib/hx509/libhx509.la $(LDADD) $(LIB_pidfile) $(LIB_heimbase)
238 include_HEADERS = kdc.h $(srcdir)/kdc-protos.h
240 noinst_HEADERS = $(srcdir)/kdc-private.h
242 krb5dir = $(includedir)/krb5
243 krb5_HEADERS = windc_plugin.h token_validator_plugin.h csr_authorizer_plugin.h
245 build_HEADERZ = $(krb5_HEADERS) # XXX
247 EXTRA_DIST = \
248         hprop-version.rc \
249         hpropd-version.rc \
250         kdc-version.rc \
251         kstash-version.rc \
252         libkdc-version.rc \
253         string2key-version.rc \
254         libkdc-exports.def \
255         NTMakefile $(man_MANS) version-script.map