This commit was manufactured by cvs2svn to create tag
[krb5.git] / src / Makefile.in
1 thisconfigdir=.
2 myfulldir=.
3 mydir=.
4 MY_SUBDIRS=util include lib @krb524@ kdc kadmin slave clients appl tests \
5         config-files gen-manpages
6 BUILDTOP=$(REL)$(C)
7 LOCALINCLUDES = -I$(srcdir) 
8
9 SRCS =  
10 HDRS = 
11
12 DISTFILES = $(SRCS) $(HDRS) COPYING COPYING.LIB ChangeLog Makefile.in
13
14 all-unix::
15
16 all-mac::
17
18 all-windows:: maybe-awk Makefile-windows
19         @echo Making in util
20         cd util
21         $(MAKE) -$(MFLAGS)
22         @echo Making in include
23         cd ..\include
24         $(MAKE) -$(MFLAGS) 
25         @echo Making in lib
26         cd ..\lib
27         $(MAKE) -$(MFLAGS) 
28         @echo Making in windows
29         cd ..\windows
30         $(MAKE) -$(MFLAGS) 
31         @echo Making in clients
32         cd ..\clients
33         $(MAKE) -$(MFLAGS)
34         @echo Making in appl\gss-sample
35         cd ..\appl\gss-sample
36         $(MAKE) -$(MFLAGS)
37         cd ..\..
38
39 world::
40         date
41         make $(MFLAGS) all
42         date
43
44 INSTALLMKDIRS = $(KRB5ROOT) $(KRB5MANROOT) $(KRB5OTHERMKDIRS) \
45                 $(ADMIN_BINDIR) $(SERVER_BINDIR) $(CLIENT_BINDIR) \
46                 $(ADMIN_MANDIR) $(SERVER_MANDIR) $(CLIENT_MANDIR) \
47                 $(FILE_MANDIR) $(KRB5_LIBDIR) $(KRB5_INCDIR) \
48                 $(KRB5_INCSUBDIRS)
49
50 install-recurse: install-mkdirs
51
52 install-mkdirs:
53         @for i in $(INSTALLMKDIRS); do \
54                 $(srcdir)/config/mkinstalldirs $(DESTDIR)$$i; \
55         done
56
57 # install::
58 #       $(MAKE) $(MFLAGS) install.man
59
60 TAGS: $(SRCS)
61         etags $(SRCS)
62
63 clean-:: clean-windows
64 clean-mac:: clean-unix
65 clean-unix::
66         $(RM) *.o core
67
68 mostlyclean: clean
69
70 # This doesn't work; if you think you need it, you should use a
71 # separate build directory.
72
73 # distclean: clean
74 #       rm -f Makefile config.status
75
76 # realclean: distclean
77 #       rm -f TAGS
78
79 dist: $(DISTFILES)
80         echo cpio-`sed -e '/version_string/!d' \
81         -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
82         rm -rf `cat .fname`
83         mkdir `cat .fname`
84         -ln $(DISTFILES) `cat .fname`
85         for file in $(DISTFILES); do \
86           test -r `cat .fname`/$$file || cp -p $$file `cat .fname`; \
87         done
88         tar chzf `cat .fname`.tar.gz `cat .fname`
89         rm -rf `cat .fname` .fname
90
91 GZIPPROG= gzip -9v
92 PKGDIR=`pwd`/pkgdir
93 pkgdir:
94         if test ! -d $(PKGDIR); then mkdir $(PKGDIR); else true; fi
95 tgz-bin: pkgdir
96         rm -rf $(PKGDIR)/install cns5-bin.tgz
97         mkdir $(PKGDIR)/install
98         $(MAKE) install DESTDIR=$(PKGDIR)/install
99         (cd $(PKGDIR)/install && tar cf - usr/cygnus) | $(GZIPPROG) > cns5-bin.tgz
100         rm -rf $(PKGDIR)/install
101
102 # Macintosh build process...
103
104 # Build all things for the Mac build, which need to be built on
105 # Unix first.
106 unixmac:
107         (cd lib/krb5/error_tables; make -f Makefile.in unixmac)
108         (cd lib/gssapi/generic; make -f Makefile.in unixmac)
109
110
111 # Microsoft Windows build process...
112 #
113
114 config-windows:: Makefile-windows
115 #       @echo Making in include
116 #       cd include
117 #       $(MAKE) -$(MFLAGS)
118 #       cd ..
119
120 #
121 # We need outpre-dir explicitly in here because we may
122 # try to build wconfig on a config-windows.
123 #
124 ##DOS##$(WCONFIG_EXE): outpre-dir wconfig.c
125 ##DOS## $(CC) -Fe$@ -Fo$*.obj wconfig.c
126
127 ##DOS##MKFDEP=$(WCONFIG_EXE) config\win-pre.in config\win-post.in
128
129 WINMAKEFILES=Makefile \
130         appl\gss-sample\Makefile \
131         clients\Makefile clients\kdestroy\Makefile \
132         clients\kinit\Makefile clients\klist\Makefile \
133         clients\kpasswd\Makefile clients\kvno\Makefile \
134         include\Makefile include\krb5\Makefile \
135         lib\Makefile lib\crypto\Makefile \
136         lib\crypto\crc32\Makefile lib\crypto\des\Makefile \
137         lib\crypto\dk\Makefile lib\crypto\enc_provider\Makefile \
138         lib\crypto\hash_provider\Makefile \
139         lib\crypto\keyhash_provider\Makefile \
140         lib\crypto\raw\Makefile lib\crypto\old\Makefile \
141         lib\crypto\sha1\Makefile \
142         lib\crypto\md4\Makefile lib\crypto\md5\Makefile \
143         lib\des425\Makefile \
144         lib\gssapi\Makefile lib\gssapi\generic\Makefile \
145         lib\gssapi\krb5\Makefile lib\gssapi\mechglue\Makefile \
146         lib\krb4\Makefile lib\krb5\Makefile \
147         lib\krb5\asn.1\Makefile lib\krb5\ccache\Makefile \
148         lib\krb5\ccache\file\Makefile \
149         lib\krb5\ccache\stdio\Makefile \
150         lib\krb5\ccache\memory\Makefile \
151         lib\krb5\ccache\ccapi\Makefile \
152         lib\krb5\error_tables\Makefile \
153         lib\krb5\keytab\Makefile \
154         lib\krb5\keytab\file\Makefile \
155         lib\krb5\keytab\srvtab\Makefile \
156         lib\krb5\krb\Makefile \
157         lib\krb5\os\Makefile lib\krb5\posix\Makefile \
158         lib\krb5\rcache\Makefile \
159         util\Makefile \
160         util\et\Makefile util\profile\Makefile \
161         util\windows\Makefile \
162         windows\Makefile windows\lib\Makefile \
163         windows\cns\Makefile windows\gina\Makefile \
164         windows\gss\Makefile windows\wintel\Makefile
165
166 ##DOS##Makefile-windows:: $(MKFDEP) $(WINMAKEFILES)
167
168 ##DOS##Makefile: Makefile.in $(MKFDEP)
169 ##DOS## $(WCONFIG) config < $@.in > $@
170 ##DOS##appl\gss-sample\Makefile: appl\gss-sample\Makefile.in $(MKFDEP)
171 ##DOS## $(WCONFIG) config < $@.in > $@
172 ##DOS##clients\Makefile: clients\Makefile.in $(MKFDEP)
173 ##DOS## $(WCONFIG) config < $@.in > $@
174 ##DOS##clients\kdestroy\Makefile: clients\kdestroy\Makefile.in $(MKFDEP)
175 ##DOS## $(WCONFIG) config < $@.in > $@
176 ##DOS##clients\kinit\Makefile: clients\kinit\Makefile.in $(MKFDEP)
177 ##DOS## $(WCONFIG) config < $@.in > $@
178 ##DOS##clients\klist\Makefile: clients\klist\Makefile.in $(MKFDEP)
179 ##DOS## $(WCONFIG) config < $@.in > $@
180 ##DOS##clients\kpasswd\Makefile: clients\kpasswd\Makefile.in $(MKFDEP)
181 ##DOS## $(WCONFIG) config < $@.in > $@
182 ##DOS##clients\kvno\Makefile: clients\kvno\Makefile.in $(MKFDEP)
183 ##DOS## $(WCONFIG) config < $@.in > $@
184 ##DOS##include\Makefile: include\Makefile.in $(MKFDEP)
185 ##DOS## $(WCONFIG) config < $@.in > $@
186 ##DOS##include\krb5\Makefile: include\krb5\Makefile.in $(MKFDEP)
187 ##DOS## $(WCONFIG) config < $@.in > $@
188 ##DOS##lib\Makefile: lib\Makefile.in $(MKFDEP)
189 ##DOS## $(WCONFIG) config < $@.in > $@
190 ##DOS##lib\crypto\Makefile: lib\crypto\Makefile.in $(MKFDEP)
191 ##DOS## $(WCONFIG) config < $@.in > $@
192 ##DOS##lib\crypto\crc32\Makefile: lib\crypto\crc32\Makefile.in $(MKFDEP)
193 ##DOS## $(WCONFIG) config < $@.in > $@
194 ##DOS##lib\crypto\des\Makefile: lib\crypto\des\Makefile.in $(MKFDEP)
195 ##DOS## $(WCONFIG) config < $@.in > $@
196 ##DOS##lib\crypto\dk\Makefile: lib\crypto\dk\Makefile.in $(MKFDEP)
197 ##DOS## $(WCONFIG) config < $@.in > $@
198 ##DOS##lib\crypto\enc_provider\Makefile: lib\crypto\enc_provider\Makefile.in $(MKFDEP)
199 ##DOS## $(WCONFIG) config < $@.in > $@
200 ##DOS##lib\crypto\hash_provider\Makefile: lib\crypto\hash_provider\Makefile.in $(MKFDEP)
201 ##DOS## $(WCONFIG) config < $@.in > $@
202 ##DOS##lib\crypto\keyhash_provider\Makefile: lib\crypto\keyhash_provider\Makefile.in $(MKFDEP)
203 ##DOS## $(WCONFIG) config < $@.in > $@
204 ##DOS##lib\crypto\sha1\Makefile: lib\crypto\sha1\Makefile.in $(MKFDEP)
205 ##DOS## $(WCONFIG) config < $@.in > $@
206 ##DOS##lib\crypto\md4\Makefile: lib\crypto\md4\Makefile.in $(MKFDEP)
207 ##DOS## $(WCONFIG) config < $@.in > $@
208 ##DOS##lib\crypto\md5\Makefile: lib\crypto\md5\Makefile.in $(MKFDEP)
209 ##DOS## $(WCONFIG) config < $@.in > $@
210 ##DOS##lib\crypto\old\Makefile: lib\crypto\old\Makefile.in $(MKFDEP)
211 ##DOS## $(WCONFIG) config < $@.in > $@
212 ##DOS##lib\crypto\raw\Makefile: lib\crypto\raw\Makefile.in $(MKFDEP)
213 ##DOS## $(WCONFIG) config < $@.in > $@
214 ##DOS##lib\des425\Makefile: lib\des425\Makefile.in $(MKFDEP)
215 ##DOS## $(WCONFIG) config < $@.in > $@
216 ##DOS##lib\gssapi\Makefile: lib\gssapi\Makefile.in $(MKFDEP)
217 ##DOS## $(WCONFIG) config < $@.in > $@
218 ##DOS##lib\gssapi\generic\Makefile: lib\gssapi\generic\Makefile.in $(MKFDEP)
219 ##DOS## $(WCONFIG) config < $@.in > $@
220 ##DOS##lib\gssapi\mechglue\Makefile: lib\gssapi\mechglue\Makefile.in $(MKFDEP)
221 ##DOS## $(WCONFIG) config < $@.in > $@
222 ##DOS##lib\gssapi\krb5\Makefile: lib\gssapi\krb5\Makefile.in $(MKFDEP)
223 ##DOS## $(WCONFIG) config < $@.in > $@
224 ##DOS##lib\krb4\Makefile: lib\krb4\Makefile.in $(MKFDEP)
225 ##DOS## $(WCONFIG) config < $@.in > $@
226 ##DOS##lib\krb5\Makefile: lib\krb5\Makefile.in $(MKFDEP)
227 ##DOS## $(WCONFIG) config < $@.in > $@
228 ##DOS##lib\krb5\asn.1\Makefile: lib\krb5\asn.1\Makefile.in $(MKFDEP)
229 ##DOS## $(WCONFIG) config < $@.in > $@
230 ##DOS##lib\krb5\ccache\Makefile: lib\krb5\ccache\Makefile.in $(MKFDEP)
231 ##DOS## $(WCONFIG) config < $@.in > $@
232 ##DOS##lib\krb5\ccache\file\Makefile: lib\krb5\ccache\file\Makefile.in $(MKFDEP)
233 ##DOS## $(WCONFIG) config < $@.in > $@
234 ##DOS##lib\krb5\ccache\stdio\Makefile: lib\krb5\ccache\stdio\Makefile.in $(MKFDEP)
235 ##DOS## $(WCONFIG) config < $@.in > $@
236 ##DOS##lib\krb5\ccache\memory\Makefile: lib\krb5\ccache\memory\Makefile.in $(MKFDEP)
237 ##DOS## $(WCONFIG) config < $@.in > $@
238 ##DOS##lib\krb5\ccache\ccapi\Makefile: lib\krb5\ccache\ccapi\Makefile.in $(MKFDEP)
239 ##DOS## $(WCONFIG) config < $@.in > $@
240 ##DOS##lib\krb5\error_tables\Makefile: lib\krb5\error_tables\Makefile.in $(MKFDEP)
241 ##DOS## $(WCONFIG) config < $@.in > $@
242 ##DOS##lib\krb5\keytab\Makefile: $$@.in $(MKFDEP)
243 ##DOS## $(WCONFIG) config < $@.in > $@
244 ##DOS##lib\krb5\keytab\file\Makefile: $$@.in $(MKFDEP)
245 ##DOS## $(WCONFIG) config < $@.in > $@
246 ##DOS##lib\krb5\keytab\srvtab\Makefile: $$@.in $(MKFDEP)
247 ##DOS## $(WCONFIG) config < $@.in > $@
248 ##DOS##lib\krb5\krb\Makefile: lib\krb5\krb\Makefile.in $(MKFDEP)
249 ##DOS## $(WCONFIG) config < $@.in > $@
250 ##DOS##lib\krb5\os\Makefile: lib\krb5\os\Makefile.in $(MKFDEP)
251 ##DOS## $(WCONFIG) config < $@.in > $@
252 ##DOS##lib\krb5\posix\Makefile: lib\krb5\posix\Makefile.in $(MKFDEP)
253 ##DOS## $(WCONFIG) config < $@.in > $@
254 ##DOS##lib\krb5\rcache\Makefile: lib\krb5\rcache\Makefile.in $(MKFDEP)
255 ##DOS## $(WCONFIG) config < $@.in > $@
256 ##DOS##util\Makefile: util\Makefile.in $(MKFDEP)
257 ##DOS## $(WCONFIG) config < $@.in > $@
258 ##DOS##util\et\Makefile: util\et\Makefile.in $(MKFDEP)
259 ##DOS## $(WCONFIG) config < $@.in > $@
260 ##DOS##util\profile\Makefile: util\profile\Makefile.in $(MKFDEP)
261 ##DOS## $(WCONFIG) config < $@.in > $@
262 ##DOS##util\windows\Makefile: util\windows\Makefile.in $(MKFDEP)
263 ##DOS## $(WCONFIG) config < $@.in > $@
264 ##DOS##windows\Makefile: windows\Makefile.in $(MKFDEP)
265 ##DOS## $(WCONFIG) config < $@.in > $@
266 ##DOS##windows\lib\Makefile: windows\lib\Makefile.in $(MKFDEP)
267 ##DOS## $(WCONFIG) config < $@.in > $@
268 ##DOS##windows\cns\Makefile: windows\cns\Makefile.in $(MKFDEP)
269 ##DOS## $(WCONFIG) config < $@.in > $@
270 ##DOS##windows\gina\Makefile: windows\gina\Makefile.in $(MKFDEP)
271 ##DOS## $(WCONFIG) config < $@.in > $@
272 ##DOS##windows\gss\Makefile: windows\gss\Makefile.in $(MKFDEP)
273 ##DOS## $(WCONFIG) config < $@.in > $@
274 ##DOS##windows\wintel\Makefile: windows\wintel\Makefile.in $(MKFDEP)
275 ##DOS## $(WCONFIG) config < $@.in > $@
276
277 clean-windows:: Makefile-windows
278         @echo Making clean in util
279         cd util
280         $(MAKE) -$(MFLAGS) clean
281         @echo Making clean in include
282         cd ..\include
283         $(MAKE) -$(MFLAGS) clean
284         @echo Making clean in lib
285         cd ..\lib
286         $(MAKE) -$(MFLAGS) clean
287         @echo Making clean in windows
288         cd ..\windows
289         $(MAKE) -$(MFLAGS) clean
290         @echo Making clean in clients
291         cd ..\clients
292         $(MAKE) -$(MFLAGS) clean
293         @echo Making in appl\gss-sample
294         cd ..\appl\gss-sample
295         $(MAKE) -$(MFLAGS) clean
296         cd ..\..
297         @echo Making clean in root
298
299 #
300 # Renames DOS 8.3 filenames back to their proper, longer names.
301 #
302 ren2long:
303         -sh config/ren2long
304
305 #
306 # Builds the file that distributes Kerberos sources for DOS and 
307 # Macintosh sites from the source tree on Unix.
308 #
309 ZIP=zip
310 FILES= ./* \
311         clients/* clients/kdestroy/* clients/kinit/* clients/klist/* \
312         clients/kpasswd/* \
313         config/* include/* include/kerberosIV/* \
314         include/krb5/* include/krb5/stock/* include/sys/* lib/* \
315         lib/crypto/* lib/crypto/crc32/* lib/crypto/des/* lib/crypto/dk/* \
316         lib/crypto/enc_provider/* lib/crypto/hash_provider/* \
317         lib/crypto/keyhash_provider/* lib/crypto/old/* lib/crypto/raw/* \
318         lib/crypto/sha1/* lib/crypto/md4/* lib/crypto/md5/* \
319         lib/des425/* lib/gssapi/* lib/gssapi/generic/* lib/gssapi/krb5/* \
320         lib/gssapi/mechglue/* lib/krb4/* \
321         lib/krb5/* lib/krb5/asn.1/* lib/krb5/krb/* \
322         lib/krb5/ccache/* lib/krb5/ccache/file/* lib/krb5/ccache/memory/* \
323         lib/krb5/ccache/stdio/* lib/krb5/ccache/ccapi/* \
324         lib/krb5/error_tables/* \
325         lib/krb5/keytab/* lib/krb5/keytab/file/* lib/krb5/keytab/srvtab/* \
326         lib/krb5/os/* lib/krb5/posix/* lib/krb5/rcache/* \
327         util/* util/et/* util/profile/*
328
329 WINFILES= util/windows/* windows/* windows/lib/* windows/cns/* \
330         windows/wintel/* windows/gss/* windows/gina/*
331
332 MACFILES= mac/* mac/libraries/* config/* include/* \
333         include/krb5/* include/krb5/stock/* include/sys/* \
334         ./patchlevel.h
335
336 WINBINARYFILES= windows/*/*.ico windows/*/*.doc windows/*/*.hlp \
337         windows/*/*.hpj windows/lib/*.lib
338
339 #
340 # Part of building the PC release has to be done on Unix. This includes
341 # anything the requires awk.
342 #
343 AWK = gawk
344 AH  = util/et/et_h.awk
345 AC  = util/et/et_c.awk
346 INC = include/
347 ET  = lib/krb5/error_tables/
348 GG  = lib/gssapi/generic/
349 GK  = lib/gssapi/krb5/
350 PR  = util/profile/
351
352 ETOUT = $(INC)asn1_err.h $(ET)asn1_err.c \
353         $(INC)kdb5_err.h $(ET)kdb5_err.c \
354         $(INC)krb5_err.h $(ET)krb5_err.c \
355         $(INC)kv5m_err.h $(ET)kv5m_err.c \
356         $(INC)adm_err.h $(ET)adm_err.c \
357         $(INC)/kerberosIV/krb_err.h lib/krb4/krb_err.c \
358         $(PR)prof_err.h $(PR)prof_err.c \
359         $(GG)gssapi_err_generic.h $(GG)gssapi_err_generic.c \
360         $(GK)gssapi_err_krb5.h $(GK)gssapi_err_krb5.c
361
362 HOUT =  $(INC)krb5.h $(GG)gssapi.h $(PR)profile.h
363
364 CLEANUP= Makefile $(ETOUT) $(HOUT) \
365         include/profile.h include/krb5/osconf.h \
366         winfile.list macfile.list
367
368
369 kerbsrc.win: kerbsrc.zip
370
371 winfile.list:
372         echo $(FILES) $(WINFILES) | tr ' ' \\012 | \
373                 sed -f config/winexclude.sed > winfile.list
374
375 MAC_SUBDIRS = lib util
376 macfile.list:
377         /bin/sh mac/macfiles.sh $(MAC_SUBDIRS) > macfile.list
378         find $(MACFILES) -prune -type f -print | \
379                 sed -f config/winexclude.sed >> macfile.list
380
381 dos-Makefile:
382         cat config/win-pre.in Makefile.in config/win-post.in | \
383                 sed -e "s/^##DOS##//" -e "s/^##DOS//" > Makefile.tmp
384         mv Makefile.tmp Makefile
385
386 prep-windows: dos-Makefile awk-windows-mac
387
388 krbsrc83.zip: krbsrc83-is-obsolete
389
390 krbsrc83-is-obsolete:
391         @echo "Win16 and krbsrc83.zip are no longer supported."
392         @echo "We don't support building under 8.3 restricted filesystems"
393         @echo "anymore.  You can still build for Win32 on filesystems"
394         @echo "without 8.3 restrictions using kerbsrc.zip"
395         @echo " "
396
397 kerbsrc.zip: dos-Makefile awk-windows-mac winfile.list
398         rm -f kerbsrc.zip
399         $(ZIP) -@Dl kerbsrc.zip < winfile.list
400         $(ZIP) -D kerbsrc.zip $(WINBINARYFILES)
401         rm -f $(CLEANUP)
402
403 kerbsrc-nt.zip: kerbsrc-nt-is-obsolete
404
405 kerbsrc-nt-is-obsolete:
406         @echo "kerbsrc-nt.zip is now obsolete.  Just use and build kerbsrc.zip"
407         @echo "We don't support building under 8.3 restricted filesystems"
408         @echo "anymore, so what was kerbsrc-nt.zip is now kerbsrc.zip."
409         @echo " "
410
411 Macfile: macfile.list 
412         rm -f Macfile
413         sed -e 's|/|:|g' -e 's/^/:/' -e '/:.:/d' -e '/:mac:/d' macfile.list > macfile.maclist
414         grep '\.c$$' macfile.maclist > macsrcsgss
415         grep -v ':gssapi:' macsrcsgss > macsrcsk5
416         echo SRCS = `cat macsrcsgss` >> Macfile
417         echo SRCDIRS = `sed -n -e 's/\(.*:\)[^:]*\.c$$/ \1/p' macfile.maclist | sort -u` >> Macfile
418         echo GSSOBJS68K = `sed -e 's/$$/.68K.o/' -e 's/.*://' \
419                 -e 's/^/:bin:68K:/' macsrcsgss` >> Macfile
420         echo GSSOBJS68KCFM = `sed -e 's/$$/.CFM68.o/' -e 's/.*://' \
421                 -e 's/^/:bin:CFM-68K:/' macsrcsgss` >> Macfile
422         echo GSSOBJSPPC = `sed -e 's/$$/.PPC.o/' -e 's/.*://' \
423                 -e 's/^/:bin:PPC:/' macsrcsgss` >> Macfile
424         echo K5OBJS68K = `sed -e 's/$$/.68K.o/' -e 's/.*://' \
425                 -e 's/^/:bin:68K:/' macsrcsk5` >> Macfile
426         echo K5OBJS68KCFM = `sed -e 's/$$/.CFM68.o/' -e 's/.*://' \
427                 -e 's/^/:bin:CFM-68K:/' macsrcsk5` >> Macfile
428         echo K5OBJSPPC = `sed -e 's/$$/.PPC.o/' -e 's/.*://' \
429                 -e 's/^/:bin:PPC:/' macsrcsk5` >> Macfile
430         echo INCLUDES = `sed -n -e 's/\(.*:\)[^:]*\.h$$/-i \1/p' macfile.maclist | sort -u` >> Macfile
431         echo "" >> Macfile
432         tr '@/:\\' '\245:\304\266'< mac/Makefile.tmpl >> Macfile
433
434 mac-bin-dirs:
435         rm -rf bin
436         mkdir bin bin/68K bin/CFM-68K bin/PPC
437         sh mac/mkbindirs.sh bin/68K $(MAC_SUBDIRS)
438         sh mac/mkbindirs.sh bin/CFM-68K $(MAC_SUBDIRS)
439         sh mac/mkbindirs.sh bin/PPC $(MAC_SUBDIRS)
440
441 kerbsrc.mac.tar: awk-windows-mac macfile.list mac-bin-dirs Macfile
442         cp mac/libraries/autoconf.h include/autoconf.h
443         mv Macfile Makefile
444         tar cvf kerbsrc.mac.tar Makefile include/autoconf.h bin \
445                 `cat macfile.list`
446         rm -f $(CLEANUP)
447         rm -rf bin
448         rm -f include/autoconf.h Makefile macsrc* macfile.maclist
449
450 $(INC)asn1_err.h: $(AH) $(ET)asn1_err.et
451         $(AWK) -f $(AH) outfile=$@ $(ET)asn1_err.et
452 $(INC)kdb5_err.h: $(AH) $(ET)kdb5_err.et
453         $(AWK) -f $(AH) outfile=$@ $(ET)kdb5_err.et
454 $(INC)krb5_err.h: $(AH) $(ET)krb5_err.et
455         $(AWK) -f $(AH) outfile=$@ $(ET)krb5_err.et
456 $(INC)kv5m_err.h: $(AH) $(ET)kv5m_err.et
457         $(AWK) -f $(AH) outfile=$@ $(ET)kv5m_err.et
458 $(INC)adm_err.h: $(AH) $(ET)adm_err.et
459         $(AWK) -f $(AH) outfile=$@ $(ET)adm_err.et
460 $(INC)/kerberosIV/krb_err.h: $(AH) lib/krb4/krb_err.et
461         $(AWK) -f $(AH) outfile=$@ lib/krb4/krb_err.et
462 $(PR)prof_err.h: $(AH) $(PR)prof_err.et
463         $(AWK) -f $(AH) outfile=$@ $(PR)prof_err.et
464 $(GG)gssapi_err_generic.h: $(AH) $(GG)gssapi_err_generic.et
465         $(AWK) -f $(AH) outfile=$@ $(GG)gssapi_err_generic.et
466 $(GK)gssapi_err_krb5.h: $(AH) $(GK)gssapi_err_krb5.et
467         $(AWK) -f $(AH) outfile=$@ $(GK)gssapi_err_krb5.et
468
469 $(ET)asn1_err.c: $(AC) $(ET)asn1_err.et
470         $(AWK) -f $(AC) outfile=$@ $(ET)asn1_err.et
471 $(ET)kdb5_err.c: $(AC) $(ET)kdb5_err.et
472         $(AWK) -f $(AC) outfile=$@ $(ET)kdb5_err.et
473 $(ET)krb5_err.c: $(AC) $(ET)krb5_err.et
474         $(AWK) -f $(AC) outfile=$@ $(ET)krb5_err.et
475 $(ET)kv5m_err.c: $(AC) $(ET)kv5m_err.et
476         $(AWK) -f $(AC) outfile=$@ $(ET)kv5m_err.et
477 $(ET)adm_err.c: $(AC) $(ET)adm_err.et
478         $(AWK) -f $(AC) outfile=$@ $(ET)adm_err.et
479 lib/krb4/krb_err.c: $(AC) lib/krb4/krb_err.et
480         $(AWK) -f $(AC) outfile=$@ lib/krb4/krb_err.et
481 $(PR)prof_err.c: $(AC) $(PR)prof_err.et
482         $(AWK) -f $(AC) outfile=$@ $(PR)prof_err.et
483 $(GG)gssapi_err_generic.c: $(AC) $(GG)gssapi_err_generic.et
484         $(AWK) -f $(AC) outfile=$@ $(GG)gssapi_err_generic.et
485 $(GK)gssapi_err_krb5.c: $(AC) $(GK)gssapi_err_krb5.et
486         $(AWK) -f $(AC) outfile=$@ $(GK)gssapi_err_krb5.et
487
488 KRBHDEP = $(INC)krb5.hin $(INC)krb5_err.h $(INC)kdb5_err.h \
489         $(INC)kv5m_err.h $(INC)asn1_err.h
490
491 $(INC)krb5.h: $(KRBHDEP)
492         rm -f $@
493         cat $(KRBHDEP) > $@
494 $(PR)profile.h: $(PR)profile.hin $(PR)prof_err.h
495         rm -f $@
496         cat $(PR)profile.hin $(PR)prof_err.h > $@
497 $(GG)gssapi.h: $(GG)gssapi.hin
498         rm -f $@
499         cat $(GG)gssapi.hin > $@
500
501 awk-windows-mac: $(ETOUT) $(HOUT)
502
503 #
504 # The maybe-awk target needs to happen after AWK is defined.
505 #
506
507 ##DOS##maybe-awk::
508 ##DOS##!ifdef WHICH_CMD
509 ##DOS##!if ![ $(WHICH_CMD) $(AWK) ]
510 ##DOS##maybe-awk:: awk-windows-mac
511 ##DOS##!endif
512 ##DOS##!endif
513
514 clean-windows-mac:
515         rm -f $(CLEANUP)
516
517 distclean-windows:
518         config\rm.bat $(CLEANUP:^/=^\)
519         config\rm.bat $(WINMAKEFILES)
520         config\rm.bat $(KBINDIR)\*.dll $(KBINDIR)\*.exe
521         @if exist $(KBINDIR)\nul rmdir $(KBINDIR)
522
523 install-windows::
524         @if "$(KRB_INSTALL_DIR)"=="" @echo KRB_INSTALL_DIR is not defined!  Please define it.
525         @if "$(KRB_INSTALL_DIR)"=="" @dir /b \nul\nul
526         @if not exist "$(KRB_INSTALL_DIR)\$(NULL)" @echo The directory $(KRB_INSTALL_DIR) does not exist.  Please create it.
527         @if not exist "$(KRB_INSTALL_DIR)\$(NULL)" @dir /b $(KRB_INSTALL_DIR)\nul
528         @if not exist "$(KRB_INSTALL_DIR)\include\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\include"
529         @if not exist "$(KRB_INSTALL_DIR)\include\gssapi\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\include\gssapi"
530         @if not exist "$(KRB_INSTALL_DIR)\lib\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\lib"
531         @if not exist "$(KRB_INSTALL_DIR)\bin\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\bin"
532         $(CP) include\krb5.h "$(KRB_INSTALL_DIR)\include\."
533         $(CP) include\win-mac.h "$(KRB_INSTALL_DIR)\include\."
534         $(CP) include\profile.h "$(KRB_INSTALL_DIR)\include\."
535         $(CP) include\com_err.h "$(KRB_INSTALL_DIR)\include\."
536         $(CP) include\gssapi\gssapi.h "$(KRB_INSTALL_DIR)\include\gssapi\."
537         $(CP) include\gssapi\gssapi_krb5.h "$(KRB_INSTALL_DIR)\include\gssapi\."
538         $(CP) lib\$(OUTPRE)*.lib "$(KRB_INSTALL_DIR)\lib\."
539         $(CP) lib\$(OUTPRE)*.dll "$(KRB_INSTALL_DIR)\bin\."
540         $(CP) windows\cns\$(OUTPRE)krb5.exe "$(KRB_INSTALL_DIR)\bin\."
541         $(CP) windows\wintel\$(OUTPRE)telnet.exe "$(KRB_INSTALL_DIR)\bin\."
542         $(CP) windows\gss\$(OUTPRE)gss.exe "$(KRB_INSTALL_DIR)\bin\."
543         $(CP) clients\klist\$(OUTPRE)klist.exe "$(KRB_INSTALL_DIR)\bin\."
544         $(CP) clients\kinit\$(OUTPRE)kinit.exe "$(KRB_INSTALL_DIR)\bin\."
545         $(CP) clients\kdestroy\$(OUTPRE)kdestroy.exe "$(KRB_INSTALL_DIR)\bin\."
546         $(CP) clients\kpasswd\$(OUTPRE)kpasswd.exe "$(KRB_INSTALL_DIR)\bin\."
547         @if exist "$(KRB_INSTALL_DIR)\bin\krb4_32.dll" del "$(KRB_INSTALL_DIR)\bin\krb4_32.dll"
548         @if exist "$(KRB_INSTALL_DIR)\lib\krb4_32.lib" del "$(KRB_INSTALL_DIR)\lib\krb4_32.lib"