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