1 CFLAGS = $(CCOPTS) $(DEFS)
8 DISTFILES = $(SRCS) $(HDRS) COPYING COPYING.LIB ChangeLog Makefile.in
14 all-windows:: makefile-windows
15 @echo Making in util\windows
17 -$(MAKE) -$(MAKEFLAGS)
18 @echo Making in include
20 -$(MAKE) -$(MAKEFLAGS)
21 @echo Making in util\et
23 -$(MAKE) -$(MAKEFLAGS)
24 @echo Making in util\profile
26 -$(MAKE) -$(MAKEFLAGS)
29 -$(MAKE) -$(MAKEFLAGS)
30 @echo Making in windows
32 -$(MAKE) -$(MAKEFLAGS)
33 @echo Making in clients
35 -$(MAKE) -$(MAKEFLAGS)
43 INSTALLMKDIRS = $(KRB5ROOT) $(KRB5MANROOT) $(KRB5OTHERMKDIRS) \
44 $(ADMIN_BINDIR) $(SERVER_BINDIR) $(CLIENT_BINDIR) \
45 $(ADMIN_MANDIR) $(SERVER_MANDIR) $(CLIENT_MANDIR) \
46 $(FILE_MANDIR) $(KRB5_LIBDIR) $(KRB5_INCDIR) \
49 install-recurse: install-mkdirs
52 @for i in $(INSTALLMKDIRS); do \
53 if test -d $(DESTDIR)$$i; then :; else (set -x; mkdir -p $(DESTDIR)$$i); fi ; \
57 # $(MAKE) $(MFLAGS) install.man
60 $(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir) $(CFLAGS) $<
65 clean-:: clean-windows
66 clean-mac:: clean-unix
72 # This doesn't work; if you think you need it, you should use a
73 # separate build directory.
76 # rm -f Makefile config.status
78 # realclean: distclean
82 echo cpio-`sed -e '/version_string/!d' \
83 -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
86 -ln $(DISTFILES) `cat .fname`
87 for file in $(DISTFILES); do \
88 test -r `cat .fname`/$$file || cp -p $$file `cat .fname`; \
90 tar chzf `cat .fname`.tar.gz `cat .fname`
91 rm -rf `cat .fname` .fname
96 if test ! -d $(PKGDIR); then mkdir $(PKGDIR); else true; fi
98 rm -rf $(PKGDIR)/install cns5-bin.tgz
99 mkdir $(PKGDIR)/install
100 $(MAKE) install DESTDIR=$(PKGDIR)/install
101 (cd $(PKGDIR)/install && tar cf - usr/cygnus) | $(GZIPPROG) > cns5-bin.tgz
102 rm -rf $(PKGDIR)/install
104 # Macintosh build process...
106 # Build all things for the Mac build, which need to be built on
109 (cd lib/krb5/error_tables; make -f Makefile.in unixmac)
110 (cd lib/gssapi/generic; make -f Makefile.in unixmac)
113 # Microsoft Windows build process...
116 config-windows:: makefile-windows
117 @echo Making in include
119 -$(MAKE) -$(MAKEFLAGS)
122 ##DOS##MKFDEP= wconfig.exe config\pre.in config\post.in \
123 ##DOS## config\windows.in config\win-post.in
125 ##DOS##makefile-windows:: $(MKFDEP) makefile \
126 ##DOS## clients\makefile clients\kdestroy\makefile \
127 ##DOS## clients\kinit\makefile clients\klist\makefile \
128 ##DOS## include\makefile include\krb5\makefile \
129 ##DOS## lib\makefile lib\crypto\makefile \
130 ##DOS## lib\crypto\crc32\makefile lib\crypto\des\makefile \
131 ##DOS## lib\crypto\sha\makefile \
132 ##DOS## lib\crypto\md4\makefile lib\crypto\md5\makefile \
133 ##DOS## lib\crypto\os\makefile lib\des425\makefile \
134 ##DOS## lib\gssapi\makefile lib\gssapi\generic\makefile \
135 ##DOS## lib\gssapi\krb5\makefile lib\gssapi\mechglue\makefile \
136 ##DOS## lib\kadm\makefile lib\krb5\makefile \
137 ##DOS## lib\krb5\asn.1\makefile lib\krb5\ccache\makefile \
138 ##DOS## lib\krb5\ccache\file\makefile \
139 ##DOS## lib\krb5\ccache\stdio\makefile \
140 ##DOS## lib\krb5\error_tables\makefile \
141 ##DOS## lib\krb5\free\makefile lib\krb5\keytab\makefile \
142 ##DOS## lib\krb5\keytab\file\makefile lib\krb5\krb\makefile \
143 ##DOS## lib\krb5\os\makefile lib\krb5\posix\makefile \
144 ##DOS## lib\krb5\rcache\makefile \
145 ##DOS## util\et\makefile util\profile\makefile \
146 ##DOS## util\windows\makefile \
147 ##DOS## windows\Makefile \
148 ##DOS## windows\cns\Makefile windows\gina\Makefile \
149 ##DOS## windows\gss\Makefile windows\wintel\Makefile
150 ##DOS## config\rm.bat wconfig.obj msvc.pdb
152 ##DOS##makefile: makefile.in $(MKFDEP)
153 ##DOS## .\wconfig config < $@.in > $@
154 ##DOS##clients\makefile: clients\makefile.in $(MKFDEP)
155 ##DOS## .\wconfig config < $@.in > $@
156 ##DOS##clients\kdestroy\makefile: clients\kdestroy\makefile.in $(MKFDEP)
157 ##DOS## .\wconfig config < $@.in > $@
158 ##DOS##clients\kinit\makefile: clients\kinit\makefile.in $(MKFDEP)
159 ##DOS## .\wconfig config < $@.in > $@
160 ##DOS##clients\klist\makefile: clients\klist\makefile.in $(MKFDEP)
161 ##DOS## .\wconfig config < $@.in > $@
162 ##DOS##include\makefile: include\makefile.in $(MKFDEP)
163 ##DOS## .\wconfig config < $@.in > $@
164 ##DOS##include\krb5\makefile: include\krb5\makefile.in $(MKFDEP)
165 ##DOS## .\wconfig config < $@.in > $@
166 ##DOS##lib\makefile: lib\makefile.in $(MKFDEP)
167 ##DOS## .\wconfig config < $@.in > $@
168 ##DOS##lib\crypto\makefile: lib\crypto\makefile.in $(MKFDEP)
169 ##DOS## .\wconfig config < $@.in > $@
170 ##DOS##lib\crypto\crc32\makefile: lib\crypto\crc32\makefile.in $(MKFDEP)
171 ##DOS## .\wconfig config < $@.in > $@
172 ##DOS##lib\crypto\des\makefile: lib\crypto\des\makefile.in $(MKFDEP)
173 ##DOS## .\wconfig config < $@.in > $@
174 ##DOS##lib\crypto\sha\makefile: lib\crypto\sha\makefile.in $(MKFDEP)
175 ##DOS## .\wconfig config < $@.in > $@
176 ##DOS##lib\crypto\md4\makefile: lib\crypto\md4\makefile.in $(MKFDEP)
177 ##DOS## .\wconfig config < $@.in > $@
178 ##DOS##lib\crypto\md5\makefile: lib\crypto\md5\makefile.in $(MKFDEP)
179 ##DOS## .\wconfig config < $@.in > $@
180 ##DOS##lib\crypto\os\makefile: lib\crypto\os\makefile.in $(MKFDEP)
181 ##DOS## .\wconfig config < $@.in > $@
182 ##DOS##lib\des425\makefile: lib\des425\makefile.in $(MKFDEP)
183 ##DOS## .\wconfig config < $@.in > $@
184 ##DOS##lib\gssapi\makefile: lib\gssapi\makefile.in $(MKFDEP)
185 ##DOS## .\wconfig config < $@.in > $@
186 ##DOS##lib\gssapi\generic\makefile: lib\gssapi\generic\makefile.in $(MKFDEP)
187 ##DOS## .\wconfig config < $@.in > $@
188 ##DOS##lib\gssapi\mechglue\makefile: lib\gssapi\mechglue\makefile.in $(MKFDEP)
189 ##DOS## .\wconfig config < $@.in > $@
190 ##DOS##lib\gssapi\krb5\makefile: lib\gssapi\krb5\makefile.in $(MKFDEP)
191 ##DOS## .\wconfig config < $@.in > $@
192 ##DOS##lib\kadm\makefile: lib\kadm\makefile.in $(MKFDEP)
193 ##DOS## .\wconfig config < $@.in > $@
194 ##DOS##lib\krb4\makefile: lib\krb4\makefile.in $(MKFDEP)
195 ##DOS## .\wconfig config < $@.in > $@
196 ##DOS##lib\krb5\makefile: lib\krb5\makefile.in $(MKFDEP)
197 ##DOS## .\wconfig config < $@.in > $@
198 ##DOS##lib\krb5\asn.1\makefile: lib\krb5\asn.1\makefile.in $(MKFDEP)
199 ##DOS## .\wconfig config < $@.in > $@
200 ##DOS##lib\krb5\ccache\makefile: lib\krb5\ccache\makefile.in $(MKFDEP)
201 ##DOS## .\wconfig config < $@.in > $@
202 ##DOS##lib\krb5\ccache\file\makefile: lib\krb5\ccache\file\makefile.in $(MKFDEP)
203 ##DOS## .\wconfig config < $@.in > $@
204 ##DOS##lib\krb5\ccache\stdio\makefile: lib\krb5\ccache\stdio\makefile.in $(MKFDEP)
205 ##DOS## .\wconfig config < $@.in > $@
206 ##DOS##lib\krb5\error_tables\makefile: lib\krb5\error_tables\makefile.in $(MKFDEP)
207 ##DOS## .\wconfig config < $@.in > $@
208 ##DOS##lib\krb5\free\makefile: lib\krb5\free\makefile.in $(MKFDEP)
209 ##DOS## .\wconfig config < $@.in > $@
210 ##DOS##lib\krb5\keytab\makefile: lib\krb5\keytab\makefile.in $(MKFDEP)
211 ##DOS## .\wconfig config < $@.in > $@
212 ##DOS##lib\krb5\keytab\file\makefile: lib\krb5\keytab\file\makefile.in $(MKFDEP)
213 ##DOS## .\wconfig config < $@.in > $@
214 ##DOS##lib\krb5\krb\makefile: lib\krb5\krb\makefile.in $(MKFDEP)
215 ##DOS## .\wconfig config < $@.in > $@
216 ##DOS##lib\krb5\os\makefile: lib\krb5\os\makefile.in $(MKFDEP)
217 ##DOS## .\wconfig config < $@.in > $@
218 ##DOS##lib\krb5\posix\makefile: lib\krb5\posix\makefile.in $(MKFDEP)
219 ##DOS## .\wconfig config < $@.in > $@
220 ##DOS##lib\krb5\rcache\makefile: lib\krb5\rcache\makefile.in $(MKFDEP)
221 ##DOS## .\wconfig config < $@.in > $@
222 ##DOS##util\et\makefile: util\et\makefile.in $(MKFDEP)
223 ##DOS## .\wconfig config < $@.in > $@
224 ##DOS##util\profile\makefile: util\profile\makefile.in $(MKFDEP)
225 ##DOS## .\wconfig config < $@.in > $@
226 ##DOS##util\windows\makefile: util\windows\makefile.in $(MKFDEP)
227 ##DOS## .\wconfig config < $@.in > $@
228 ##DOS##windows\Makefile: windows\Makefile.in $(MKFDEP)
229 ##DOS## .\wconfig config < $@.in > $@
230 ##DOS##windows\cns\Makefile: windows\cns\Makefile.in $(MKFDEP)
231 ##DOS## .\wconfig config < $@.in > $@
232 ##DOS##windows\gina\Makefile: windows\gina\Makefile.in $(MKFDEP)
233 ##DOS## .\wconfig config < $@.in > $@
234 ##DOS##windows\gss\Makefile: windows\gss\Makefile.in $(MKFDEP)
235 ##DOS## .\wconfig config < $@.in > $@
236 ##DOS##windows\wintel\Makefile: windows\wintel\Makefile.in $(MKFDEP)
237 ##DOS## .\wconfig config < $@.in > $@
239 ##DOS##wconfig.exe: wconfig.c
240 ##DOS## SET CL=/nologo
241 ##DOS## $(CC) /AL wconfig.c
244 @echo Making clean in include
246 -$(MAKE) -$(MAKEFLAGS) clean
247 @echo Making clean in util\et
249 -$(MAKE) -$(MAKEFLAGS) clean
250 @echo Making clean in util\profile
252 -$(MAKE) -$(MAKEFLAGS) clean
253 @echo Making clean in lib
255 -$(MAKE) -$(MAKEFLAGS) clean
256 @echo Making clean in windows
258 -$(MAKE) -$(MAKEFLAGS) clean
260 @echo Making clean in root
261 config\rm.bat *.obj msvc.pdb *.err wconfig.obj wconfig.exe
264 # Renames DOS 8.3 filenames back to their proper, longer names.
270 # Builds the file that distributes Kerberos sources for DOS and
271 # Macintosh sites from the source tree on Unix.
275 clients/* clients/kdestroy/* clients/kinit/* clients/klist/* \
276 config/* include/* include/krb5/* include/krb5/asn.1/* \
277 include/krb5/stock/* include/sys/* lib/* \
278 lib/crypto/* lib/crypto/crc32/* lib/crypto/des/* \
279 lib/crypto/sha/* lib/crypto/md4/* lib/crypto/md5/* lib/crypto/os/* \
280 lib/des425/* lib/gssapi/* lib/gssapi/generic/* lib/gssapi/krb5/* \
281 lib/gssapi/mechglue/* lib/kadm/* lib/krb4/* \
282 lib/krb5/* lib/krb5/asn.1/* lib/krb5/krb/* \
283 lib/krb5/ccache/* lib/krb5/ccache/file/* \
284 lib/krb5/ccache/stdio/* lib/krb5/error_tables/* \
285 lib/krb5/free/* lib/krb5/keytab/* lib/krb5/keytab/file/* \
286 lib/krb5/os/* lib/krb5/posix/* lib/krb5/rcache/* \
287 util/et/* util/profile/*
289 WINFILES= util/windows/* \
290 windows/* windows/cns/* windows/wintel/* windows/gss/* windows/gina/*
292 MACFILES= mac/* mac/kconfig/* mac/libraries/* mac/telnet-k5-auth/* \
293 mac/gss-sample/* mac/SAP/* config/* include/* include/krb5/* \
294 include/krb5/asn.1/* include/krb5/stock/* include/sys/* \
297 WINBINARYFILES=windows/cns/*.ico windows/wintel/*.ico windows/gss/*.ico
300 # Part of building the PC release has to be done on Unix. This includes
301 # anything the requires awk.
303 AH = util/et/et_h.awk
304 AC = util/et/et_c.awk
306 ET = lib/krb5/error_tables/
307 GG = lib/gssapi/generic/
308 GK = lib/gssapi/krb5/
311 ETOUT = $(INC)asn1_err.h $(ET)asn1_err.c \
312 $(INC)kdb5_err.h $(ET)kdb5_err.c \
313 $(INC)krb5_err.h $(ET)krb5_err.c \
314 $(INC)kv5m_err.h $(ET)kv5m_err.c \
315 $(INC)adm_err.h $(ET)adm_err.c \
316 $(PR)prof_err.h $(PR)prof_err.c \
317 $(GG)gssapi_err_generic.h $(GG)gssapi_err_generic.c \
318 $(GK)gssapi_err_krb5.h $(GK)gssapi_err_krb5.c
320 HOUT = $(INC)krb5.h $(GG)gssapi.h $(PR)profile.h
322 CLEANUP= $(ETOUT) $(HOUT) \
323 include/profile.h include/krb5/osconf.h \
324 winfile.list macfile.list
327 kerbsrc.win: kerbsrc.zip
330 echo $(FILES) $(WINFILES) | tr ' ' \\012 | \
331 sed -f config/winexclude.sed > winfile.list
333 MAC_SUBDIRS = lib util
335 /bin/sh mac/macfiles.sh $(MAC_SUBDIRS) > macfile.list
336 find $(MACFILES) -prune -type f -print | \
337 sed -f config/winexclude.sed >> macfile.list
341 mv Makefile Makefile.sav
342 cat config/windows.in Makefile.in config/win-post.in | \
343 sed -e 's/^##DOS##//' -e 's/^##DOS//' > Makefile
345 kerbsrc.zip: Makefile.sav awk-windows-mac winfile.list
347 $(ZIP) -Dlk kerbsrc.zip `cat winfile.list`
348 $(ZIP) -Dk kerbsrc.zip $(WINBINARYFILES)
349 mv Makefile.sav Makefile
352 kerbsrc-nt.zip: Makefile.sav awk-windows-mac winfile.list
354 $(ZIP) -Dl kerbsrc-nt.zip `cat winfile.list`
355 $(ZIP) -D kerbsrc-nt.zip $(WINBINARYFILES)
356 mv Makefile.sav Makefile
359 dos-zipfiles: Makefile.sav awk-windows-mac winfile.list
361 $(ZIP) -Dlk kerbsrc.zip `cat winfile.list`
362 $(ZIP) -Dk kerbsrc.zip $(WINBINARYFILES)
364 $(ZIP) -Dl kerbsrc-nt.zip `cat winfile.list`
365 $(ZIP) -D kerbsrc-nt.zip $(WINBINARYFILES)
366 mv Makefile.sav Makefile
369 Macfile: macfile.list Makefile.sav
371 sed -e 's|/|:|g' -e 's/^/:/' -e '/:.:/d' -e '/:mac:/d' macfile.list > macfile.maclist
372 grep '\.c$$' macfile.maclist > macsrcsgss
373 grep -v ':gssapi:' macsrcsgss > macsrcsk5
374 echo SRCS = `cat macsrcsgss` >> Macfile
375 echo GSSOBJS68K = `sed -e 's/$$/.68K.o/' -e 's/.*://' \
376 -e 's/^/:bin:68K:/' macsrcsgss` >> Macfile
377 echo GSSOBJS68KCFM = `sed -e 's/$$/.68K.o/' -e 's/.*://' \
378 -e 's/^/:bin:CFM-68K:/' macsrcsgss` >> Macfile
379 echo GSSOBJSPPC = `sed -e 's/$$/.PPC.o/' -e 's/.*://' \
380 -e 's/^/:bin:PPC:/' macsrcsgss` >> Macfile
381 echo K5OBJS68K = `sed -e 's/$$/.68K.o/' -e 's/.*://' \
382 -e 's/^/:bin:68K:/' macsrcsk5` >> Macfile
383 echo K5OBJS68KCFM = `sed -e 's/$$/.68K.o/' -e 's/.*://' \
384 -e 's/^/:bin:CFM-68K:/' macsrcsk5` >> Macfile
385 echo K5OBJSPPC = `sed -e 's/$$/.PPC.o/' -e 's/.*://' \
386 -e 's/^/:bin:PPC:/' macsrcsk5` >> Macfile
387 echo INCLUDES = `sed -n -e 's/\(.*:\)[^:]*\.h$$/-i \1/p' macfile.maclist | sort -u` >> Macfile
389 tr '%/:\\' '/:\304\266'< mac/Makefile.tmpl >> Macfile
393 mkdir bin bin/68K bin/CFM-68K bin/PPC
394 sh mac/mkbindirs.sh bin/68K $(MAC_SUBDIRS)
395 sh mac/mkbindirs.sh bin/CFM-68K $(MAC_SUBDIRS)
396 sh mac/mkbindirs.sh bin/PPC $(MAC_SUBDIRS)
398 kerbsrc.mac.tar: awk-windows-mac macfile.list mac-bin-dirs Macfile
399 cp mac/libraries/autoconf.h include/autoconf.h
401 tar cvf kerbsrc.mac.tar Makefile include/autoconf.h bin \
405 rm -f include/autoconf.h Makefile macsrc* macfile.maclist
406 mv Makefile.sav Makefile
409 $(INC)asn1_err.h: $(AH) $(ET)asn1_err.et
410 gawk -f $(AH) outfile=$@ $(ET)asn1_err.et
411 $(INC)kdb5_err.h: $(AH) $(ET)kdb5_err.et
412 gawk -f $(AH) outfile=$@ $(ET)kdb5_err.et
413 $(INC)krb5_err.h: $(AH) $(ET)krb5_err.et
414 gawk -f $(AH) outfile=$@ $(ET)krb5_err.et
415 $(INC)kv5m_err.h: $(AH) $(ET)kv5m_err.et
416 gawk -f $(AH) outfile=$@ $(ET)kv5m_err.et
417 $(INC)adm_err.h: $(AH) $(ET)adm_err.et
418 gawk -f $(AH) outfile=$@ $(ET)adm_err.et
419 $(PR)prof_err.h: $(AH) $(PR)prof_err.et
420 gawk -f $(AH) outfile=$@ $(PR)prof_err.et
421 $(GG)gssapi_err_generic.h: $(AH) $(GG)gssapi_err_generic.et
422 gawk -f $(AH) outfile=$@ $(GG)gssapi_err_generic.et
423 $(GK)gssapi_err_krb5.h: $(AH) $(GK)gssapi_err_krb5.et
424 gawk -f $(AH) outfile=$@ $(GK)gssapi_err_krb5.et
426 $(ET)asn1_err.c: $(AC) $(ET)asn1_err.et
427 gawk -f $(AC) outfile=$@ $(ET)asn1_err.et
428 $(ET)kdb5_err.c: $(AC) $(ET)kdb5_err.et
429 gawk -f $(AC) outfile=$@ $(ET)kdb5_err.et
430 $(ET)krb5_err.c: $(AC) $(ET)krb5_err.et
431 gawk -f $(AC) outfile=$@ $(ET)krb5_err.et
432 $(ET)kv5m_err.c: $(AC) $(ET)kv5m_err.et
433 gawk -f $(AC) outfile=$@ $(ET)kv5m_err.et
434 $(ET)adm_err.c: $(AC) $(ET)adm_err.et
435 gawk -f $(AC) outfile=$@ $(ET)adm_err.et
436 $(PR)prof_err.c: $(AC) $(PR)prof_err.et
437 gawk -f $(AC) outfile=$@ $(PR)prof_err.et
438 $(GG)gssapi_err_generic.c: $(AC) $(GG)gssapi_err_generic.et
439 gawk -f $(AC) outfile=$@ $(GG)gssapi_err_generic.et
440 $(GK)gssapi_err_krb5.c: $(AC) $(GK)gssapi_err_krb5.et
441 gawk -f $(AC) outfile=$@ $(GK)gssapi_err_krb5.et
443 KRBHDEP = $(INC)krb5.hin $(INC)krb5_err.h $(INC)kdb5_err.h \
444 $(INC)kv5m_err.h $(INC)asn1_err.h
446 $(INC)krb5.h: $(KRBHDEP)
449 $(PR)profile.h: $(PR)profile.hin $(PR)prof_err.h
451 cat $(PR)profile.hin $(PR)prof_err.h > $@
452 $(GG)gssapi.h: $(GG)gssapi.hin
454 cat $(GG)gssapi.hin > $@
456 awk-windows-mac: $(ETOUT) $(HOUT)