4 # Don't build sample by default, and definitely don't install them
6 # plugins/locate/python
8 # plugins/preauth/cksum_body
9 # plugins/authdata/greet
10 SUBDIRS=util include lib \
13 plugins/preauth/pkinit \
14 plugins/preauth/encrypted_challenge \
15 kdc kadmin slave clients appl tests \
16 config-files gen-manpages
18 LOCALINCLUDES = -I$(srcdir)
23 # Why aren't these flags showing up in Windows builds?
24 ##DOS##CPPFLAGS=$(CPPFLAGS) -D_X86_=1 -DWIN32 -D_WIN32 -W3 -D_WINNT
26 DISTFILES = $(SRCS) $(HDRS) COPYING COPYING.LIB ChangeLog Makefile.in
28 all-unix:: krb5-config
30 # Lots of things will start to depend on the thread support, which
31 # needs autoconf.h, but building "all" in include requires that util/et
32 # have been built first. Until we can untangle this, let's just check
33 # that autoconf.h is up to date before going into any of the subdirectories.
34 all-prerecurse generate-files-mac-prerecurse: update-autoconf-h
36 (cd include && $(MAKE) autoconf.h osconf.h)
39 # This makefile doesn't use lib.in, but we still need shlib.conf here.
40 config.status: $(top_srcdir)/config/shlib.conf
43 all-windows:: maybe-awk Makefile-windows
44 @echo Making autoconf.h in include
46 $(MAKE) -$(MFLAGS) autoconf.h
50 @echo Making in include
59 @echo Making in windows
62 @echo Making in clients
65 @echo Making in appl\gss-sample
68 @echo Making in appl\gssftp\ftp
69 cd ..\..\appl\gssftp\ftp
78 INSTALLMKDIRS = $(KRB5ROOT) $(KRB5MANROOT) $(KRB5OTHERMKDIRS) \
79 $(ADMIN_BINDIR) $(SERVER_BINDIR) $(CLIENT_BINDIR) \
80 $(ADMIN_MANDIR) $(SERVER_MANDIR) $(CLIENT_MANDIR) \
81 $(FILE_MANDIR) $(KRB5_LIBDIR) $(KRB5_INCDIR) \
82 $(KRB5_DB_MODULE_DIR) $(KRB5_PA_MODULE_DIR) \
83 $(KRB5_AD_MODULE_DIR) \
84 $(KRB5_LIBKRB5_MODULE_DIR) \
85 @localstatedir@ @localstatedir@/krb5kdc \
86 $(KRB5_INCSUBDIRS) $(datadir) $(EXAMPLEDIR)
89 $(MAKE) install INSTALL_STRIP=-s
91 install-recurse: install-mkdirs
94 @for i in $(INSTALLMKDIRS); do \
95 $(srcdir)/config/mkinstalldirs $(DESTDIR)$$i; \
98 install-headers-mkdirs:
99 $(srcdir)/config/mkinstalldirs $(DESTDIR)$(KRB5_INCDIR)
100 $(srcdir)/config/mkinstalldirs $(DESTDIR)$(KRB5_INCDIR)/gssapi
101 $(srcdir)/config/mkinstalldirs $(DESTDIR)$(KRB5_INCDIR)/gssrpc
102 install-headers-prerecurse: install-headers-mkdirs
105 # $(MAKE) $(MFLAGS) install.man
108 $(RM) -r $(FAKEPREFIX)
109 @for i in $(INSTALLMKDIRS); do \
110 $(srcdir)/config/mkinstalldirs util/fakedest$$i; \
112 (w=`pwd`; cd util && $(MAKE) install DESTDIR="$$w/util/fakedest")
113 (w=`pwd`; cd lib && $(MAKE) install DESTDIR="$$w/util/fakedest")
114 (w=`pwd`; cd plugins/kdb/db2 && $(MAKE) install DESTDIR="$$w/util/fakedest")
115 if test -r plugins/preauth/pkinit/Makefile; then \
116 (w=`pwd`; cd plugins/preauth/pkinit && $(MAKE) install DESTDIR="$$w/util/fakedest"); \
119 # (w=`pwd`; cd plugins/locate/python && $(MAKE) install DESTDIR="$$w/util/fakedest")
124 clean-:: clean-windows
126 $(RM) *.o core krb5-config
127 $(RM) -r util/fakedest
131 # This doesn't work; if you think you need it, you should use a
132 # separate build directory.
135 # rm -f Makefile config.status
137 # realclean: distclean
141 echo cpio-`sed -e '/version_string/!d' \
142 -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
145 -ln $(DISTFILES) `cat .fname`
146 for file in $(DISTFILES); do \
147 test -r `cat .fname`/$$file || cp -p $$file `cat .fname`; \
149 tar chzf `cat .fname`.tar.gz `cat .fname`
150 rm -rf `cat .fname` .fname
155 if test ! -d $(PKGDIR); then mkdir $(PKGDIR); else true; fi
157 rm -rf $(PKGDIR)/install cns5-bin.tgz
158 mkdir $(PKGDIR)/install
159 $(MAKE) install DESTDIR=$(PKGDIR)/install
160 (cd $(PKGDIR)/install && tar cf - usr/cygnus) | $(GZIPPROG) > cns5-bin.tgz
161 rm -rf $(PKGDIR)/install
163 # Microsoft Windows build process...
166 config-windows:: Makefile-windows
167 # @echo Making in include
173 # We need outpre-dir explicitly in here because we may
174 # try to build wconfig on a config-windows.
176 ##DOS##$(WCONFIG_EXE): outpre-dir wconfig.c
177 ##DOS## $(CC) -Fe$@ -Fo$*.obj wconfig.c $(CCLINKOPTION)
178 ##DOS## $(_VC_MANIFEST_EMBED_EXE)
180 ##DOS##MKFDEP=$(WCONFIG_EXE) config\win-pre.in config\win-post.in
182 WINMAKEFILES=Makefile \
183 appl\gss-sample\Makefile \
184 appl\gssftp\ftp\Makefile \
186 ccapi\lib\win\Makefile \
187 ccapi\server\win\Makefile \
188 ccapi\test\Makefile \
189 clients\Makefile clients\kdestroy\Makefile \
190 clients\kinit\Makefile clients\klist\Makefile \
191 clients\kpasswd\Makefile clients\kvno\Makefile \
192 clients\kcpytkt\Makefile clients\kdeltkt\Makefile \
194 lib\Makefile lib\crypto\Makefile \
195 lib\crypto\krb\crc32\Makefile lib\crypto\@CRYPTO_IMPL@\des\Makefile \
196 lib\crypto\krb\dk\Makefile lib\crypto\@CRYPTO_IMPL@\enc_provider\Makefile \
197 lib\crypto\@CRYPTO_IMPL@\hash_provider\Makefile \
198 lib\crypto\krb\keyhash_provider\Makefile \
199 lib\crypto\krb\prf\Makefile lib\crypto\krb\rand2key\Makefile \
200 lib\crypto\krb\raw\Makefile lib\crypto\krb\old\Makefile \
201 lib\crypto\@CRYPTO_IMPL@\sha1\Makefile lib\crypto\@CRYPTO_IMPL@\arcfour\Makefile \
202 lib\crypto\@CRYPTO_IMPL@\md4\Makefile lib\crypto\@CRYPTO_IMPL@\md5\Makefile \
203 lib\crypto\krb\yarrow\Makefile lib\crypto\@CRYPTO_IMPL@\aes\Makefile \
204 lib\crypto\crypto_tests \
205 lib\gssapi\Makefile lib\gssapi\generic\Makefile \
206 lib\gssapi\krb5\Makefile lib\gssapi\mechglue\Makefile \
207 lib\gssapi\spnego\Makefile \
209 lib\krb5\asn.1\Makefile lib\krb5\ccache\Makefile \
210 lib\krb5\ccache\ccapi\Makefile \
211 lib\krb5\error_tables\Makefile \
212 lib\krb5\keytab\Makefile \
213 lib\krb5\krb\Makefile \
214 lib\krb5\os\Makefile lib\krb5\posix\Makefile \
215 lib\krb5\rcache\Makefile \
216 lib\krb5\unicode\Makefile \
218 util\et\Makefile util\profile\Makefile \
219 util\support\Makefile \
220 util\windows\Makefile \
221 windows\Makefile windows\lib\Makefile \
222 windows\cns\Makefile windows\gina\Makefile \
223 windows\gss\Makefile windows\ms2mit\Makefile \
224 windows\wintel\Makefile windows\kfwlogon\Makefile
226 ##DOS##Makefile-windows:: $(MKFDEP) $(WINMAKEFILES)
228 ##DOS##Makefile: Makefile.in $(MKFDEP)
229 ##DOS## $(WCONFIG) config < $@.in > $@
230 ##DOS##appl\gss-sample\Makefile: appl\gss-sample\Makefile.in $(MKFDEP)
231 ##DOS## $(WCONFIG) config < $@.in > $@
232 ##DOS##appl\gssftp\ftp\Makefile: appl\gssftp\ftp\Makefile.in $(MKFDEP)
233 ##DOS## $(WCONFIG) config < $@.in > $@
234 ##DOS##ccapi\Makefile: ccapi\Makefile.in $(MKFDEP)
235 ##DOS## $(WCONFIG) config < $@.in > $@
236 ##DOS##ccapi\lib\win\Makefile: ccapi\lib\win\Makefile.in $(MKFDEP)
237 ##DOS## $(WCONFIG) config < $@.in > $@
238 ##DOS##ccapi\server\win\Makefile: ccapi\server\win\Makefile.in $(MKFDEP)
239 ##DOS## $(WCONFIG) config < $@.in > $@
240 ##DOS##ccapi\test\Makefile: ccapi\test\Makefile.in $(MKFDEP)
241 ##DOS## $(WCONFIG) config < $@.in > $@
242 ##DOS##clients\Makefile: clients\Makefile.in $(MKFDEP)
243 ##DOS## $(WCONFIG) config < $@.in > $@
244 ##DOS##clients\kdestroy\Makefile: clients\kdestroy\Makefile.in $(MKFDEP)
245 ##DOS## $(WCONFIG) config < $@.in > $@
246 ##DOS##clients\kinit\Makefile: clients\kinit\Makefile.in $(MKFDEP)
247 ##DOS## $(WCONFIG) config < $@.in > $@
248 ##DOS##clients\klist\Makefile: clients\klist\Makefile.in $(MKFDEP)
249 ##DOS## $(WCONFIG) config < $@.in > $@
250 ##DOS##clients\kpasswd\Makefile: clients\kpasswd\Makefile.in $(MKFDEP)
251 ##DOS## $(WCONFIG) config < $@.in > $@
252 ##DOS##clients\kvno\Makefile: clients\kvno\Makefile.in $(MKFDEP)
253 ##DOS## $(WCONFIG) config < $@.in > $@
254 ##DOS##clients\kcpytkt\Makefile: clients\kcpytkt\Makefile.in $(MKFDEP)
255 ##DOS## $(WCONFIG) config < $@.in > $@
256 ##DOS##clients\kdeltkt\Makefile: clients\kdeltkt\Makefile.in $(MKFDEP)
257 ##DOS## $(WCONFIG) config < $@.in > $@
258 ##DOS##include\Makefile: include\Makefile.in $(MKFDEP)
259 ##DOS## $(WCONFIG) config < $@.in > $@
260 ##DOS##lib\Makefile: lib\Makefile.in $(MKFDEP)
261 ##DOS## $(WCONFIG) config < $@.in > $@
262 ##DOS##lib\crypto\Makefile: lib\crypto\Makefile.in $(MKFDEP)
263 ##DOS## $(WCONFIG) config < $@.in > $@
264 ##DOS##lib\crypto\krb\crc32\Makefile: lib\crypto\krb\crc32\Makefile.in $(MKFDEP)
265 ##DOS## $(WCONFIG) config < $@.in > $@
266 ##DOS##lib\crypto\@CRYPTO_IMPL@\des\Makefile: lib\crypto\@CRYPTO_IMPL@\des\Makefile.in $(MKFDEP)
267 ##DOS## $(WCONFIG) config < $@.in > $@
268 ##DOS##lib\crypto\krb\dk\Makefile: lib\crypto\krb\dk\Makefile.in $(MKFDEP)
269 ##DOS## $(WCONFIG) config < $@.in > $@
270 ##DOS##lib\crypto\@CRYPTO_IMPL@\enc_provider\Makefile: lib\crypto\@CRYPTO_IMPL@\enc_provider\Makefile.in $(MKFDEP)
271 ##DOS## $(WCONFIG) config < $@.in > $@
272 ##DOS##lib\crypto\@CRYPTO_IMPL@\hash_provider\Makefile: lib\crypto\@CRYPTO_IMPL@\hash_provider\Makefile.in $(MKFDEP)
273 ##DOS## $(WCONFIG) config < $@.in > $@
274 ##DOS##lib\crypto\krb\keyhash_provider\Makefile: lib\crypto\krb\keyhash_provider\Makefile.in $(MKFDEP)
275 ##DOS## $(WCONFIG) config < $@.in > $@
276 ##DOS##lib\crypto\@CRYPTO_IMPL@\sha1\Makefile: lib\crypto\@CRYPTO_IMPL@\sha1\Makefile.in $(MKFDEP)
277 ##DOS## $(WCONFIG) config < $@.in > $@
278 ##DOS##lib\crypto\@CRYPTO_IMPL@\arcfour\Makefile: lib\crypto\@CRYPTO_IMPL@\arcfour\Makefile.in $(MKFDEP)
279 ##DOS## $(WCONFIG) config < $@.in > $@
280 ##DOS##lib\crypto\@CRYPTO_IMPL@\md4\Makefile: lib\crypto\@CRYPTO_IMPL@\md4\Makefile.in $(MKFDEP)
281 ##DOS## $(WCONFIG) config < $@.in > $@
282 ##DOS##lib\crypto\@CRYPTO_IMPL@\md5\Makefile: lib\crypto\md5\@CRYPTO_IMPL@\Makefile.in $(MKFDEP)
283 ##DOS## $(WCONFIG) config < $@.in > $@
284 ##DOS##lib\crypto\krb\yarrow\Makefile: lib\crypto\krb\yarrow\Makefile.in $(MKFDEP)
285 ##DOS## $(WCONFIG) config < $@.in > $@
286 ##DOS##lib\crypto\@CRYPTO_IMPL@\aes\Makefile: lib\crypto\@CRYPTO_IMPL@\aes\Makefile.in $(MKFDEP)
287 ##DOS## $(WCONFIG) config < $@.in > $@
288 ##DOS##lib\crypto\krb\old\Makefile: lib\crypto\krb\old\Makefile.in $(MKFDEP)
289 ##DOS## $(WCONFIG) config < $@.in > $@
290 ##DOS##lib\crypto\krb\raw\Makefile: lib\crypto\krb\raw\Makefile.in $(MKFDEP)
291 ##DOS## $(WCONFIG) config < $@.in > $@
292 ##DOS##lib\crypto\krb\Makefile: lib\crypto\krb\Makefile.in $(MKFDEP)
293 ##DOS## $(WCONFIG) config < $@.in > $@
294 ##DOS##lib\crypto\@CRYPTO_IMPL@\Makefile: lib\crypto\@CRYPTO_IMPL@\Makefile.in $(MKFDEP)
295 ##DOS## $(WCONFIG) config < $@.in > $@
296 ##DOS##lib\gssapi\Makefile: lib\gssapi\Makefile.in $(MKFDEP)
297 ##DOS## $(WCONFIG) config < $@.in > $@
298 ##DOS##lib\gssapi\generic\Makefile: lib\gssapi\generic\Makefile.in $(MKFDEP)
299 ##DOS## $(WCONFIG) config < $@.in > $@
300 ##DOS##lib\gssapi\mechglue\Makefile: lib\gssapi\mechglue\Makefile.in $(MKFDEP)
301 ##DOS## $(WCONFIG) config < $@.in > $@
302 ##DOS##lib\gssapi\spnego\Makefile: lib\gssapi\spnego\Makefile.in $(MKFDEP)
303 ##DOS## $(WCONFIG) config < $@.in > $@
304 ##DOS##lib\gssapi\krb5\Makefile: lib\gssapi\krb5\Makefile.in $(MKFDEP)
305 ##DOS## $(WCONFIG) config < $@.in > $@
306 ##DOS##lib\krb5\Makefile: lib\krb5\Makefile.in $(MKFDEP)
307 ##DOS## $(WCONFIG) config < $@.in > $@
308 ##DOS##lib\krb5\asn.1\Makefile: lib\krb5\asn.1\Makefile.in $(MKFDEP)
309 ##DOS## $(WCONFIG) config < $@.in > $@
310 ##DOS##lib\krb5\ccache\Makefile: lib\krb5\ccache\Makefile.in $(MKFDEP)
311 ##DOS## $(WCONFIG) config < $@.in > $@
312 ##DOS##lib\krb5\ccache\ccapi\Makefile: lib\krb5\ccache\ccapi\Makefile.in $(MKFDEP)
313 ##DOS## $(WCONFIG) config < $@.in > $@
314 ##DOS##lib\krb5\error_tables\Makefile: lib\krb5\error_tables\Makefile.in $(MKFDEP)
315 ##DOS## $(WCONFIG) config < $@.in > $@
316 ##DOS##lib\krb5\keytab\Makefile: $$@.in $(MKFDEP)
317 ##DOS## $(WCONFIG) config < $@.in > $@
318 ##DOS##lib\krb5\krb\Makefile: lib\krb5\krb\Makefile.in $(MKFDEP)
319 ##DOS## $(WCONFIG) config < $@.in > $@
320 ##DOS##lib\krb5\os\Makefile: lib\krb5\os\Makefile.in $(MKFDEP)
321 ##DOS## $(WCONFIG) config < $@.in > $@
322 ##DOS##lib\krb5\posix\Makefile: lib\krb5\posix\Makefile.in $(MKFDEP)
323 ##DOS## $(WCONFIG) config < $@.in > $@
324 ##DOS##lib\krb5\rcache\Makefile: lib\krb5\rcache\Makefile.in $(MKFDEP)
325 ##DOS## $(WCONFIG) config < $@.in > $@
326 ##DOS##lib\krb5\unicode\Makefile: lib\krb5\unicode\Makefile.in $(MKFDEP)
327 ##DOS## $(WCONFIG) config < $@.in > $@
328 ##DOS##util\Makefile: util\Makefile.in $(MKFDEP)
329 ##DOS## $(WCONFIG) config < $@.in > $@
330 ##DOS##util\et\Makefile: util\et\Makefile.in $(MKFDEP)
331 ##DOS## $(WCONFIG) config < $@.in > $@
332 ##DOS##util\profile\Makefile: util\profile\Makefile.in $(MKFDEP)
333 ##DOS## $(WCONFIG) config < $@.in > $@
334 ##DOS##util\support\Makefile: util\support\Makefile.in $(MKFDEP)
335 ##DOS## $(WCONFIG) config < $@.in > $@
336 ##DOS##util\windows\Makefile: util\windows\Makefile.in $(MKFDEP)
337 ##DOS## $(WCONFIG) config < $@.in > $@
338 ##DOS##windows\Makefile: windows\Makefile.in $(MKFDEP)
339 ##DOS## $(WCONFIG) config < $@.in > $@
340 ##DOS##windows\lib\Makefile: windows\lib\Makefile.in $(MKFDEP)
341 ##DOS## $(WCONFIG) config < $@.in > $@
342 ##DOS##windows\cns\Makefile: windows\cns\Makefile.in $(MKFDEP)
343 ##DOS## $(WCONFIG) config < $@.in > $@
344 ##DOS##windows\gina\Makefile: windows\gina\Makefile.in $(MKFDEP)
345 ##DOS## $(WCONFIG) config < $@.in > $@
346 ##DOS##windows\gss\Makefile: windows\gss\Makefile.in $(MKFDEP)
347 ##DOS## $(WCONFIG) config < $@.in > $@
348 ##DOS##windows\ms2mit\Makefile: windows\ms2mit\Makefile.in $(MKFDEP)
349 ##DOS## $(WCONFIG) config < $@.in > $@
350 ##DOS##windows\wintel\Makefile: windows\wintel\Makefile.in $(MKFDEP)
351 ##DOS## $(WCONFIG) config < $@.in > $@
352 ##DOS##windows\kfwlogon\Makefile: windows\kfwlogon\Makefile.in $(MKFDEP)
353 ##DOS## $(WCONFIG) config < $@.in > $@
355 clean-windows:: Makefile-windows
356 @echo Making clean in util
358 $(MAKE) -$(MFLAGS) clean
359 @echo Making clean in include
361 $(MAKE) -$(MFLAGS) clean
362 @echo Making clean in lib
364 $(MAKE) -$(MFLAGS) clean
365 @echo Making clean in windows
367 $(MAKE) -$(MFLAGS) clean
368 @echo Making clean in clients
370 $(MAKE) -$(MFLAGS) clean
371 @echo Making clean in appl\gss-sample
372 cd ..\appl\gss-sample
373 $(MAKE) -$(MFLAGS) clean
374 @echo Making clean in appl\gssftp\ftp
375 cd ..\..\appl\gssftp\ftp
376 $(MAKE) -$(MFLAGS) clean
378 @echo Making clean in root
381 # Renames DOS 8.3 filenames back to their proper, longer names.
387 # Builds the file that distributes Kerberos sources for DOS and
388 # Macintosh sites from the source tree on Unix.
392 clients/* clients/kdestroy/* clients/kinit/* clients/klist/* \
393 clients/kpasswd/* clients/kcpytkt/* clients/kdeltkt/* \
394 config/* include/* include/kerberosIV/* \
395 include/krb5/* include/krb5/stock/* include/sys/* lib/* \
396 lib/crypto/* lib/crypto/krb/crc32/* lib/crypto/@CRYPTO_IMPL@/des/* lib/crypto/krb/dk/* \
397 lib/crypto/@CRYPTO_IMPL@/enc_provider/* lib/crypto/@CRYPTO_IMPL@/hash_provider/* \
398 lib/crypto/krb/keyhash_provider/* \
399 lib/crypto/krb/prf/* lib/crypto/krb/rand2key/* \
400 lib/crypto/krb/old/* lib/crypto/krb/raw/* \
401 lib/crypto/@CRYPTO_IMPL@/sha1/* lib/crypto/@CRYPTO_IMPL@/arcfour/* \
402 lib/crypto/@CRYPTO_IMPL@/md4/* \
403 lib/crypto/@CRYPTO_IMPL@/md5/* lib/crypto/krb/yarrow/* \
404 lib/crypto/@CRYPTO_IMPL@/* lib/crypto/krb/* lib/crypto/crypto_tests \
405 lib/gssapi/* lib/gssapi/generic/* lib/gssapi/krb5/* \
406 lib/gssapi/mechglue/* lib/gssapi/spnego/* \
407 lib/krb5/* lib/krb5/asn.1/* lib/krb5/krb/* \
408 lib/krb5/ccache/* lib/krb5/ccache/ccapi/* \
409 lib/krb5/error_tables/* \
410 lib/krb5/keytab/* lib/krb5/keytab/file/* lib/krb5/keytab/srvtab/* \
411 lib/krb5/os/* lib/krb5/posix/* lib/krb5/rcache/* \
412 util/* util/et/* util/profile/*
415 ccapi/common/* ccapi/common/win/* ccapi/common/win/OldCC/* \
416 ccapi/lib/* ccapi/lib/win/* ccapi/lib/win/OldCC/* \
417 ccapi/server/* ccapi/server/win/* \
419 util/windows/* windows/* windows/lib/* windows/cns/* \
420 windows/wintel/* windows/gss/* windows/gina/* windows/ms2mit/* \
423 WINBINARYFILES= windows/*/*.ico windows/*/*.doc windows/*/*.hlp \
424 windows/*/*.hpj windows/lib/*.lib
427 # Part of building the PC release has to be done on Unix. This includes
428 # anything the requires awk.
431 AH = util/et/et_h.awk
432 AC = util/et/et_c.awk
434 ET = lib/krb5/error_tables/
435 GG = lib/gssapi/generic/
436 GK = lib/gssapi/krb5/
442 $(INC)asn1_err.h $(ET)asn1_err.c \
443 $(INC)kdb5_err.h $(ET)kdb5_err.c \
444 $(INC)krb5_err.h $(ET)krb5_err.c \
445 $(INC)kv5m_err.h $(ET)kv5m_err.c \
446 $(INC)krb524_err.h $(ET)krb524_err.c \
447 $(PR)prof_err.h $(PR)prof_err.c \
448 $(GG)gssapi_err_generic.h $(GG)gssapi_err_generic.c \
449 $(GK)gssapi_err_krb5.h $(GK)gssapi_err_krb5.c \
450 $(CCL)ccapi_err.h $(CCL)ccapi_err.c
452 HOUT = $(INC)krb5\krb5.h $(GG)gssapi.h $(PR)profile.h
454 CLEANUP= Makefile $(ETOUT) $(HOUT) \
455 include/profile.h include/osconf.h \
459 kerbsrc.win: kerbsrc.zip
462 echo $(FILES) $(WINFILES) | tr ' ' \\012 | \
463 sed -f config/winexclude.sed > winfile.list
466 cat config/win-pre.in Makefile.in config/win-post.in | \
467 sed -e "s/^##DOS##//" -e "s/^##DOS//" > Makefile.tmp
468 mv Makefile.tmp Makefile
470 prep-windows: dos-Makefile awk-windows-mac
472 krbsrc83.zip: krbsrc83-is-obsolete
474 krbsrc83-is-obsolete:
475 @echo "Win16 and krbsrc83.zip are no longer supported."
476 @echo "We don't support building under 8.3 restricted filesystems"
477 @echo "anymore. You can still build for Win32 on filesystems"
478 @echo "without 8.3 restrictions using kerbsrc.zip"
481 kerbsrc.zip: dos-Makefile awk-windows-mac winfile.list
483 $(ZIP) -@Dl kerbsrc.zip < winfile.list
484 $(ZIP) -D kerbsrc.zip $(WINBINARYFILES)
487 kerbsrc-nt.zip: kerbsrc-nt-is-obsolete
489 kerbsrc-nt-is-obsolete:
490 @echo "kerbsrc-nt.zip is now obsolete. Just use and build kerbsrc.zip"
491 @echo "We don't support building under 8.3 restricted filesystems"
492 @echo "anymore, so what was kerbsrc-nt.zip is now kerbsrc.zip."
495 $(INC)asn1_err.h: $(AH) $(ET)asn1_err.et
496 $(AWK) -f $(AH) outfile=$@ $(ET)asn1_err.et
497 $(INC)kdb5_err.h: $(AH) $(ET)kdb5_err.et
498 $(AWK) -f $(AH) outfile=$@ $(ET)kdb5_err.et
499 $(INC)krb5_err.h: $(AH) $(ET)krb5_err.et
500 $(AWK) -f $(AH) outfile=$@ $(ET)krb5_err.et
501 $(INC)kv5m_err.h: $(AH) $(ET)kv5m_err.et
502 $(AWK) -f $(AH) outfile=$@ $(ET)kv5m_err.et
503 $(INC)krb524_err.h: $(AH) $(ET)krb524_err.et
504 $(AWK) -f $(AH) outfile=$@ $(ET)krb524_err.et
505 $(PR)prof_err.h: $(AH) $(PR)prof_err.et
506 $(AWK) -f $(AH) outfile=$@ $(PR)prof_err.et
507 $(GG)gssapi_err_generic.h: $(AH) $(GG)gssapi_err_generic.et
508 $(AWK) -f $(AH) outfile=$@ $(GG)gssapi_err_generic.et
509 $(GK)gssapi_err_krb5.h: $(AH) $(GK)gssapi_err_krb5.et
510 $(AWK) -f $(AH) outfile=$@ $(GK)gssapi_err_krb5.et
511 $(CCL)ccapi_err.h: $(AH) $(CCL)ccapi_err.et
512 $(AWK) -f $(AH) outfile=$@ $(CCL)ccapi_err.et
513 $(CE)test1.h: $(AH) $(CE)test1.et
514 $(AWK) -f $(AH) outfile=$@ $(CE)test1.et
515 $(CE)test2.h: $(AH) $(CE)test2.et
516 $(AWK) -f $(AH) outfile=$@ $(CE)test2.et
518 $(ET)asn1_err.c: $(AC) $(ET)asn1_err.et
519 $(AWK) -f $(AC) outfile=$@ $(ET)asn1_err.et
520 $(ET)kdb5_err.c: $(AC) $(ET)kdb5_err.et
521 $(AWK) -f $(AC) outfile=$@ $(ET)kdb5_err.et
522 $(ET)krb5_err.c: $(AC) $(ET)krb5_err.et
523 $(AWK) -f $(AC) outfile=$@ $(ET)krb5_err.et
524 $(ET)kv5m_err.c: $(AC) $(ET)kv5m_err.et
525 $(AWK) -f $(AC) outfile=$@ $(ET)kv5m_err.et
526 $(ET)krb524_err.c: $(AC) $(ET)krb524_err.et
527 $(AWK) -f $(AC) outfile=$@ $(ET)krb524_err.et
528 $(PR)prof_err.c: $(AC) $(PR)prof_err.et
529 $(AWK) -f $(AC) outfile=$@ $(PR)prof_err.et
530 $(GG)gssapi_err_generic.c: $(AC) $(GG)gssapi_err_generic.et
531 $(AWK) -f $(AC) outfile=$@ $(GG)gssapi_err_generic.et
532 $(GK)gssapi_err_krb5.c: $(AC) $(GK)gssapi_err_krb5.et
533 $(AWK) -f $(AC) outfile=$@ $(GK)gssapi_err_krb5.et
534 $(CCL)ccapi_err.c: $(AC) $(CCL)ccapi_err.et
535 $(AWK) -f $(AC) outfile=$@ $(CCL)ccapi_err.et
536 $(CE)test1.c: $(AC) $(CE)test1.et
537 $(AWK) -f $(AC) outfile=$@ $(CE)test1.et
538 $(CE)test2.c: $(AC) $(CE)test2.et
539 $(AWK) -f $(AC) outfile=$@ $(CE)test2.et
541 KRBHDEP = $(INC)krb5\krb5.hin $(INC)krb5_err.h $(INC)kdb5_err.h \
542 $(INC)kv5m_err.h $(INC)krb524_err.h $(INC)asn1_err.h
544 $(INC)krb5\krb5.h: $(KRBHDEP)
547 $(PR)profile.h: $(PR)profile.hin $(PR)prof_err.h
549 cat $(PR)profile.hin $(PR)prof_err.h > $@
550 $(GG)gssapi.h: $(GG)gssapi.hin
552 cat $(GG)gssapi.hin > $@
554 awk-windows-mac: $(ETOUT) $(HOUT)
557 # The maybe-awk target needs to happen after AWK is defined.
561 ##DOS##!ifdef WHICH_CMD
562 ##DOS##!if ![ $(WHICH_CMD) $(AWK) ]
563 ##DOS##maybe-awk:: awk-windows-mac
571 config\rm.bat $(CLEANUP:^/=^\)
572 config\rm.bat $(WINMAKEFILES)
573 config\rm.bat $(KBINDIR)\*.dll $(KBINDIR)\*.exe
574 @if exist $(KBINDIR)\nul rmdir $(KBINDIR)
577 @if "$(KRB_INSTALL_DIR)"=="" @echo KRB_INSTALL_DIR is not defined! Please define it.
578 @if "$(KRB_INSTALL_DIR)"=="" @dir /b \nul\nul
579 @if not exist "$(KRB_INSTALL_DIR)\$(NULL)" @echo The directory $(KRB_INSTALL_DIR) does not exist. Please create it.
580 @if not exist "$(KRB_INSTALL_DIR)\$(NULL)" @dir /b $(KRB_INSTALL_DIR)\nul
581 @if not exist "$(KRB_INSTALL_DIR)\include\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\include"
582 @if not exist "$(KRB_INSTALL_DIR)\include\krb5\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\include\krb5"
583 @if not exist "$(KRB_INSTALL_DIR)\include\gssapi\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\include\gssapi"
584 @if not exist "$(KRB_INSTALL_DIR)\lib\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\lib"
585 @if not exist "$(KRB_INSTALL_DIR)\bin\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\bin"
586 $(CP) include\krb5.h "$(KRB_INSTALL_DIR)\include\."
587 $(CP) include\krb5\krb5.h "$(KRB_INSTALL_DIR)\include\krb5\."
588 $(CP) include\win-mac.h "$(KRB_INSTALL_DIR)\include\."
589 $(CP) include\profile.h "$(KRB_INSTALL_DIR)\include\."
590 $(CP) include\com_err.h "$(KRB_INSTALL_DIR)\include\."
591 $(CP) include\gssapi\gssapi.h "$(KRB_INSTALL_DIR)\include\gssapi\."
592 $(CP) include\gssapi\gssapi_krb5.h "$(KRB_INSTALL_DIR)\include\gssapi\."
593 $(CP) lib\$(OUTPRE)*.lib "$(KRB_INSTALL_DIR)\lib\."
594 $(CP) lib\$(OUTPRE)*.dll "$(KRB_INSTALL_DIR)\bin\."
595 $(CP) windows\cns\$(OUTPRE)krb5.exe "$(KRB_INSTALL_DIR)\bin\."
596 $(CP) windows\wintel\$(OUTPRE)telnet.exe "$(KRB_INSTALL_DIR)\bin\."
597 $(CP) windows\gss\$(OUTPRE)gss.exe "$(KRB_INSTALL_DIR)\bin\."
598 $(CP) appl\gss-sample\$(OUTPRE)gss-server.exe "$(KRB_INSTALL_DIR)\bin\."
599 $(CP) appl\gss-sample\$(OUTPRE)gss-client.exe "$(KRB_INSTALL_DIR)\bin\."
600 $(CP) windows\ms2mit\$(OUTPRE)ms2mit.exe "$(KRB_INSTALL_DIR)\bin\."
601 $(CP) appl\gssftp\ftp\$(OUTPRE)ftp.exe "$(KRB_INSTALL_DIR)\bin\."
602 $(CP) ccapi\lib\win\$(OUTPRE)ccapi.dll "$(KRB_INSTALL_DIR)\bin\."
603 $(CP) ccapi\server\win\$(OUTPRE)ccapiserver.exe "$(KRB_INSTALL_DIR)\bin\."
604 $(CP) clients\kvno\$(OUTPRE)kvno.exe "$(KRB_INSTALL_DIR)\bin\."
605 $(CP) clients\klist\$(OUTPRE)klist.exe "$(KRB_INSTALL_DIR)\bin\."
606 $(CP) clients\kinit\$(OUTPRE)kinit.exe "$(KRB_INSTALL_DIR)\bin\."
607 $(CP) clients\kdestroy\$(OUTPRE)kdestroy.exe "$(KRB_INSTALL_DIR)\bin\."
608 $(CP) clients\kcpytkt\$(OUTPRE)kcpytkt.exe "$(KRB_INSTALL_DIR)\bin\."
609 $(CP) clients\kdeltkt\$(OUTPRE)kdeltkt.exe "$(KRB_INSTALL_DIR)\bin\."
610 $(CP) clients\kpasswd\$(OUTPRE)kpasswd.exe "$(KRB_INSTALL_DIR)\bin\."
613 $(INSTALL_SCRIPT) krb5-config \
614 $(DESTDIR)$(CLIENT_BINDIR)/krb5-config
615 $(INSTALL_DATA) $(srcdir)/krb5-config.M $(DESTDIR)$(CLIENT_MANDIR)/krb5-config.1
617 krb5-config: $(srcdir)/krb5-config.in config.status
618 $(SHELL) config.status krb5-config
620 # Test to ensure that krb5-config does not spit out things like
621 # $(PURE) or $(LDFLAGS) in case someone changes config/shlib.conf
622 check-unix:: krb5-config
623 $(SHELL) $(srcdir)/t_krbconf
624 check-prerecurse: fake-install
627 COV_ANALYZE= cov-analyze
628 COV_COMMIT= cov-commit-defects --product "$(COV_PRODUCT)" --user "$(COV_USER)" --target "$(COV_TARGET)" --description "$(COV_DESC)"
629 COV_MAKE_LIB= cov-make-library
637 # Set to, e.g., "--all" or "--security".
639 # Temporary directory, might as well put it in the build tree.
640 COV_TEMPDIR= cov-temp
641 # Sources modeling some functions or macros confusing Prevent.
643 $(top_srcdir)/util/coverity-models/threads.c
645 # Depend on Makefiles to ensure that (in maintainer mode) the configure
646 # scripts won't get rerun under cov-build.
647 coverity prevent cov: Makefiles
648 $(COV_BUILD) --dir $(COV_TEMPDIR) $(MAKE) all
649 $(COV_ANALYZE) $(COV_ANALYSES) --dir $(COV_TEMPDIR)
650 if test "$(COV_DATADIR)" != ""; then \
651 $(COV_COMMIT) --dir $(COV_TEMPDIR) --datadir $(COV_DATADIR); \
653 echo "** Coverity Prevent analysis results not commit to Defect Manager"; \
678 kadmin/cli/strftime.c \
679 kadmin/server/ipropd_svc.c \
680 kadmin/server/kadm_rpc_svc.c \
681 lib/kadm5/admin_xdr.h \
682 lib/kadm5/clnt/client_rpc.c \
683 lib/kadm5/kadm_rpc.h \
684 lib/kadm5/kadm_rpc_xdr.c \
685 lib/kadm5/srv/adb_xdr.c \
686 lib/krb5/krb/strftime.c \
687 lib/krb5/krb/strptime.c \
689 util/support/mkstemp.c \
690 util/support/strlcpy.c \
691 util/windows/getopt.c \
692 util/windows/getopt.h \
693 util/windows/getopt_long.c
697 include/k5-platform.h \
699 lib/crypto/builtin/aes \
700 lib/krb5/krb/deltat.c \
702 plugins/kdb/db2/libdb2 \
703 plugins/kdb/db2/pol_xdr.c \
704 plugins/kdb/hdb/hdb.h \
705 plugins/kdb/hdb/hdb_asn1.h \
706 plugins/kdb/hdb/hdb_err.h \
707 plugins/kdb/hdb/windc_plugin.h \
708 plugins/kdb/ldap/libkdb_ldap/princ_xdr.c \
709 plugins/kdb/ldap/libkdb_ldap/princ_xdr.h \
710 plugins/preauth/pkinit/pkcs11.h \
711 plugins/preauth/pkinit/pkinit_accessor.h \
712 plugins/preauth/pkinit/pkinit_crypto.h \
713 plugins/preauth/pkinit/pkinit.h \
714 plugins/preauth/pkinit/pkinit_crypto_openssl.h \
715 tests/asn.1/ktest.h \
716 tests/asn.1/ktest_equal.h \
717 tests/asn.1/utility.h \
718 tests/gss-threads/gss-misc.c \
719 tests/gss-threads/gss-misc.h \
720 tests/hammer/kdc5_hammer.c \
722 util/profile/prof_int.h \
723 util/profile/profile.hin \
724 util/profile/profile_tcl.c
726 EXCLUDES = `for i in $(BSDFILES) $(OTHEREXCLUDES); do echo $$i; done | $(AWK) '{ print "-path", $$1, "-o" }'` -path /dev/null
729 (cd $(top_srcdir) && \
731 \( -name '*.[ch]' -o -name '*.hin' -o -name '*.[ch].in' \) \
732 -print0 | $(XARGS) -0 $(EMACS) -q -batch \
733 -l util/krb5-c-style.el \
734 -l util/krb5-batch-reindent.el)
736 mark-cstyle:: mark-cstyle-krb5 mark-cstyle-bsd
739 (cd $(top_srcdir) && \
740 $(FIND) $(INDENTDIRS) \( $(EXCLUDES) \) -prune -o \
742 -print0 | $(XARGS) -0 $(PYTHON) util/krb5-mark-cstyle.py \
746 (cd $(top_srcdir) && $(FIND) $(BSDFILES) -print0 | $(XARGS) -0 \
747 $(PYTHON) util/krb5-mark-cstyle.py --cstyle=bsd)