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