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