This commit was manufactured by cvs2svn to create tag
[krb5.git] / src / Makefile.in
index f955a4e4cf322d95c759928e7ba536dc2d0641f3..771be6af003db3837b36fcfeca4f7d53ddeeefc6 100644 (file)
@@ -1,36 +1,40 @@
-CFLAGS = $(CCOPTS) $(DEFS)
+thisconfigdir=.
+myfulldir=.
+mydir=.
+MY_SUBDIRS=util include lib @krb524@ kdc kadmin slave clients appl tests \
+       config-files gen-manpages
+BUILDTOP=$(REL)$(C)
+LOCALINCLUDES = -I$(srcdir) 
 
 SRCS =  
 HDRS = 
 
 DISTFILES = $(SRCS) $(HDRS) COPYING COPYING.LIB ChangeLog Makefile.in
 
-all:: all-$(WHAT)
-
 all-unix::
 
 all-mac::
 
-all-: all-windows
-
-LIBCMD = lib
-all-windows:: makefile-windows
+all-windows:: maybe-awk Makefile-windows
+       @echo Making in util
+       cd util
+       $(MAKE) -$(MFLAGS)
        @echo Making in include
-       cd include
-       -$(MAKE) -$(MAKEFLAGS) LIBCMD=$(LIBCMD)
-       @echo Making in util\et
-       cd ..\util\et
-       -$(MAKE) -$(MAKEFLAGS) LIBCMD=$(LIBCMD)
-       @echo Making in util\profile
-       cd ..\profile
-       -$(MAKE) -$(MAKEFLAGS) LIBCMD=$(LIBCMD)
+       cd ..\include
+       $(MAKE) -$(MFLAGS) 
        @echo Making in lib
-       cd ..\..\lib
-       -$(MAKE) -$(MAKEFLAGS) LIBCMD=$(LIBCMD)
+       cd ..\lib
+       $(MAKE) -$(MFLAGS) 
        @echo Making in windows
        cd ..\windows
-       -$(MAKE) -$(MAKEFLAGS) LIBCMD=$(LIBCMD)
-       cd ..
+       $(MAKE) -$(MFLAGS) 
+       @echo Making in clients
+       cd ..\clients
+       $(MAKE) -$(MFLAGS)
+       @echo Making in appl\gss-sample
+       cd ..\appl\gss-sample
+       $(MAKE) -$(MFLAGS)
+       cd ..\..
 
 world::
        date
@@ -43,24 +47,19 @@ INSTALLMKDIRS = $(KRB5ROOT) $(KRB5MANROOT) $(KRB5OTHERMKDIRS) \
                $(FILE_MANDIR) $(KRB5_LIBDIR) $(KRB5_INCDIR) \
                $(KRB5_INCSUBDIRS)
 
-install:: install-mkdirs
+install-recurse: install-mkdirs
 
 install-mkdirs:
        @for i in $(INSTALLMKDIRS); do \
-               if test -d $(DESTDIR)$$i; then :; else (set -x; mkdir -p $(DESTDIR)$$i); fi \
+               $(srcdir)/config/mkinstalldirs $(DESTDIR)$$i; \
        done
 
 # install::
 #      $(MAKE) $(MFLAGS) install.man
 
-.c.o:
-       $(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir) $(CFLAGS) $<
-
 TAGS: $(SRCS)
        etags $(SRCS)
 
-clean:: clean-$(WHAT)
-
 clean-:: clean-windows
 clean-mac:: clean-unix
 clean-unix::
@@ -68,11 +67,14 @@ clean-unix::
 
 mostlyclean: clean
 
-distclean: clean
-       rm -f Makefile config.status
-
-realclean: distclean
-       rm -f TAGS
+# This doesn't work; if you think you need it, you should use a
+# separate build directory.
+# 
+# distclean: clean
+#      rm -f Makefile config.status
+# 
+# realclean: distclean
+#      rm -f TAGS
 
 dist: $(DISTFILES)
        echo cpio-`sed -e '/version_string/!d' \
@@ -86,6 +88,17 @@ dist: $(DISTFILES)
        tar chzf `cat .fname`.tar.gz `cat .fname`
        rm -rf `cat .fname` .fname
 
+GZIPPROG= gzip -9v
+PKGDIR=`pwd`/pkgdir
+pkgdir:
+       if test ! -d $(PKGDIR); then mkdir $(PKGDIR); else true; fi
+tgz-bin: pkgdir
+       rm -rf $(PKGDIR)/install cns5-bin.tgz
+       mkdir $(PKGDIR)/install
+       $(MAKE) install DESTDIR=$(PKGDIR)/install
+       (cd $(PKGDIR)/install && tar cf - usr/cygnus) | $(GZIPPROG) > cns5-bin.tgz
+       rm -rf $(PKGDIR)/install
+
 # Macintosh build process...
 
 # Build all things for the Mac build, which need to be built on
@@ -98,84 +111,190 @@ unixmac:
 # Microsoft Windows build process...
 #
 
-config-windows:: makefile-windows
-       @echo Making in include
-       cd include
-       -$(MAKE) -$(MAKEFLAGS)
-       cd ..
-
-makefile-windows:: wconfig.exe config\pre.in config\post.in \
-               include\makefile.in include\krb5\makefile.in \
-               lib\makefile.in lib\crypto\makefile.in \
-               lib\crypto\crc32\makefile.in lib\crypto\des\makefile.in \
-               lib\crypto\md4\makefile.in lib\crypto\md5\makefile.in \
-               lib\crypto\os\makefile.in lib\des425\makefile.in \
-               lib\gssapi\makefile.in lib\gssapi\generic\makefile.in \
-               lib\gssapi\krb5\makefile.in lib\krb5\makefile.in \
-               lib\krb5\asn.1\makefile.in lib\krb5\ccache\makefile.in \
-               lib\krb5\ccache\file\makefile.in \
-               lib\krb5\ccache\stdio\makefile.in \
-               lib\krb5\error_ta\makefile.in \
-               lib\krb5\free\makefile.in lib\krb5\keytab\makefile.in \
-               lib\krb5\keytab\file\makefile.in lib\krb5\krb\makefile.in \
-               lib\krb5\os\makefile.in lib\krb5\posix\makefile.in \
-               lib\krb5\rcache\makefile.in \
-               util\et\makefile.in util\profile\makefile.in
-       type makefile.in >makefile
-       .\wconfig config <include\makefile.in >include\makefile
-       .\wconfig config <include\krb5\makefile.in >include\krb5\makefile
-       .\wconfig config <lib\makefile.in >lib\makefile
-       .\wconfig config <lib\crypto\makefile.in >lib\crypto\makefile
-       .\wconfig config <lib\crypto\crc32\makefile.in >lib\crypto\crc32\makefile
-       .\wconfig config <lib\crypto\des\makefile.in >lib\crypto\des\makefile
-       .\wconfig config <lib\crypto\md4\makefile.in >lib\crypto\md4\makefile
-       .\wconfig config <lib\crypto\md5\makefile.in >lib\crypto\md5\makefile
-       .\wconfig config <lib\crypto\os\makefile.in >lib\crypto\os\makefile
-       .\wconfig config <lib\des425\makefile.in >lib\des425\makefile
-       .\wconfig config <lib\gssapi\makefile.in >lib\gssapi\makefile
-       .\wconfig config <lib\gssapi\generic\makefile.in >lib\gssapi\generic\makefile
-       .\wconfig config <lib\gssapi\krb5\makefile.in >lib\gssapi\krb5\makefile
-       .\wconfig config <lib\kadm\makefile.in >lib\kadm\makefile
-       .\wconfig config <lib\krb5\makefile.in >lib\krb5\makefile
-       .\wconfig config <lib\krb5\asn.1\makefile.in >lib\krb5\asn.1\makefile
-       .\wconfig config <lib\krb5\ccache\makefile.in >lib\krb5\ccache\makefile
-       .\wconfig config <lib\krb5\ccache\file\makefile.in >lib\krb5\ccache\file\makefile
-       .\wconfig config <lib\krb5\ccache\stdio\makefile.in >lib\krb5\ccache\stdio\makefile
-       .\wconfig config <lib\krb5\error_ta\makefile.in >lib\krb5\error_ta\makefile
-       .\wconfig config <lib\krb5\free\makefile.in >lib\krb5\free\makefile
-       .\wconfig config <lib\krb5\keytab\makefile.in >lib\krb5\keytab\makefile
-       .\wconfig config <lib\krb5\keytab\file\makefile.in >lib\krb5\keytab\file\makefile
-       .\wconfig config <lib\krb5\krb\makefile.in >lib\krb5\krb\makefile
-       .\wconfig config <lib\krb5\os\makefile.in >lib\krb5\os\makefile
-       .\wconfig config <lib\krb5\posix\makefile.in >lib\krb5\posix\makefile
-       .\wconfig config <lib\krb5\rcache\makefile.in >lib\krb5\rcache\makefile
-       .\wconfig config <util\et\makefile.in >util\et\makefile
-       .\wconfig config <util\profile\makefile.in >util\profile\makefile
-       config\rm.bat wconfig.obj msvc.pdb
-
-wconfig.exe: wconfig.c
-       SET CL=/nologo
-       $(CC) /AL wconfig.c
-
-clean-windows::
+config-windows:: Makefile-windows
+#      @echo Making in include
+#      cd include
+#      $(MAKE) -$(MFLAGS)
+#      cd ..
+
+#
+# We need outpre-dir explicitly in here because we may
+# try to build wconfig on a config-windows.
+#
+##DOS##$(WCONFIG_EXE): outpre-dir wconfig.c
+##DOS##        $(CC) -Fe$@ -Fo$*.obj wconfig.c
+
+##DOS##MKFDEP=$(WCONFIG_EXE) config\win-pre.in config\win-post.in
+
+WINMAKEFILES=Makefile \
+       appl\gss-sample\Makefile \
+       clients\Makefile clients\kdestroy\Makefile \
+       clients\kinit\Makefile clients\klist\Makefile \
+       clients\kpasswd\Makefile clients\kvno\Makefile \
+       include\Makefile include\krb5\Makefile \
+       lib\Makefile lib\crypto\Makefile \
+       lib\crypto\crc32\Makefile lib\crypto\des\Makefile \
+       lib\crypto\dk\Makefile lib\crypto\enc_provider\Makefile \
+       lib\crypto\hash_provider\Makefile \
+       lib\crypto\keyhash_provider\Makefile \
+       lib\crypto\raw\Makefile lib\crypto\old\Makefile \
+       lib\crypto\sha1\Makefile \
+       lib\crypto\md4\Makefile lib\crypto\md5\Makefile \
+       lib\des425\Makefile \
+       lib\gssapi\Makefile lib\gssapi\generic\Makefile \
+       lib\gssapi\krb5\Makefile lib\gssapi\mechglue\Makefile \
+       lib\krb4\Makefile lib\krb5\Makefile \
+       lib\krb5\asn.1\Makefile lib\krb5\ccache\Makefile \
+       lib\krb5\ccache\file\Makefile \
+       lib\krb5\ccache\stdio\Makefile \
+       lib\krb5\ccache\memory\Makefile \
+       lib\krb5\ccache\ccapi\Makefile \
+       lib\krb5\error_tables\Makefile \
+       lib\krb5\keytab\Makefile \
+       lib\krb5\keytab\file\Makefile \
+       lib\krb5\keytab\srvtab\Makefile \
+       lib\krb5\krb\Makefile \
+       lib\krb5\os\Makefile lib\krb5\posix\Makefile \
+       lib\krb5\rcache\Makefile \
+       util\Makefile \
+       util\et\Makefile util\profile\Makefile \
+       util\windows\Makefile \
+       windows\Makefile windows\lib\Makefile \
+       windows\cns\Makefile windows\gina\Makefile \
+       windows\gss\Makefile windows\wintel\Makefile
+
+##DOS##Makefile-windows:: $(MKFDEP) $(WINMAKEFILES)
+
+##DOS##Makefile: Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##appl\gss-sample\Makefile: appl\gss-sample\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##clients\Makefile: clients\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##clients\kdestroy\Makefile: clients\kdestroy\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##clients\kinit\Makefile: clients\kinit\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##clients\klist\Makefile: clients\klist\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##clients\kpasswd\Makefile: clients\kpasswd\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##clients\kvno\Makefile: clients\kvno\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##include\Makefile: include\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##include\krb5\Makefile: include\krb5\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\Makefile: lib\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\Makefile: lib\crypto\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\crc32\Makefile: lib\crypto\crc32\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\des\Makefile: lib\crypto\des\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\dk\Makefile: lib\crypto\dk\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\enc_provider\Makefile: lib\crypto\enc_provider\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\hash_provider\Makefile: lib\crypto\hash_provider\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\keyhash_provider\Makefile: lib\crypto\keyhash_provider\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\sha1\Makefile: lib\crypto\sha1\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\md4\Makefile: lib\crypto\md4\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\md5\Makefile: lib\crypto\md5\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\old\Makefile: lib\crypto\old\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\raw\Makefile: lib\crypto\raw\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\des425\Makefile: lib\des425\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\gssapi\Makefile: lib\gssapi\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\gssapi\generic\Makefile: lib\gssapi\generic\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\gssapi\mechglue\Makefile: lib\gssapi\mechglue\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\gssapi\krb5\Makefile: lib\gssapi\krb5\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\krb4\Makefile: lib\krb4\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\krb5\Makefile: lib\krb5\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\krb5\asn.1\Makefile: lib\krb5\asn.1\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\krb5\ccache\Makefile: lib\krb5\ccache\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\krb5\ccache\file\Makefile: lib\krb5\ccache\file\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\krb5\ccache\stdio\Makefile: lib\krb5\ccache\stdio\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\krb5\ccache\memory\Makefile: lib\krb5\ccache\memory\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\krb5\ccache\ccapi\Makefile: lib\krb5\ccache\ccapi\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\krb5\error_tables\Makefile: lib\krb5\error_tables\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\krb5\keytab\Makefile: $$@.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\krb5\keytab\file\Makefile: $$@.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\krb5\keytab\srvtab\Makefile: $$@.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\krb5\krb\Makefile: lib\krb5\krb\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\krb5\os\Makefile: lib\krb5\os\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\krb5\posix\Makefile: lib\krb5\posix\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\krb5\rcache\Makefile: lib\krb5\rcache\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##util\Makefile: util\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##util\et\Makefile: util\et\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##util\profile\Makefile: util\profile\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##util\windows\Makefile: util\windows\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##windows\Makefile: windows\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##windows\lib\Makefile: windows\lib\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##windows\cns\Makefile: windows\cns\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##windows\gina\Makefile: windows\gina\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##windows\gss\Makefile: windows\gss\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##windows\wintel\Makefile: windows\wintel\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+
+clean-windows:: Makefile-windows
+       @echo Making clean in util
+       cd util
+       $(MAKE) -$(MFLAGS) clean
        @echo Making clean in include
-       cd include
-       -$(MAKE) -$(MAKEFLAGS) clean
-       @echo Making clean in util\et
-       cd ..\util\et
-       -$(MAKE) -$(MAKEFLAGS) clean
-       @echo Making clean in util\profile
-       cd ..\profile
-       -$(MAKE) -$(MAKEFLAGS) clean
+       cd ..\include
+       $(MAKE) -$(MFLAGS) clean
        @echo Making clean in lib
-       cd ..\..\lib
-       -$(MAKE) -$(MAKEFLAGS) clean
+       cd ..\lib
+       $(MAKE) -$(MFLAGS) clean
        @echo Making clean in windows
        cd ..\windows
-       -$(MAKE) -$(MAKEFLAGS) clean
-       cd ..
+       $(MAKE) -$(MFLAGS) clean
+       @echo Making clean in clients
+       cd ..\clients
+       $(MAKE) -$(MFLAGS) clean
+       @echo Making in appl\gss-sample
+       cd ..\appl\gss-sample
+       $(MAKE) -$(MFLAGS) clean
+       cd ..\..
        @echo Making clean in root
-       config\rm.bat *.obj msvc.pdb *.err wconfig.obj wconfig.exe
 
 #
 # Renames DOS 8.3 filenames back to their proper, longer names.
@@ -189,78 +308,39 @@ ren2long:
 #
 ZIP=zip
 FILES= ./* \
-       config/* include/* include/krb5/* include/krb5/asn.1/* \
-       include/krb5/stock/* include/sys/* lib/* lib/crypto/* \
-       lib/crypto/crc32/* lib/crypto/des/* lib/crypto/md4/* \
-       lib/crypto/md5/* lib/crypto/os/* lib/des425/* lib/gssapi/* \
-       lib/gssapi/generic/* lib/gssapi/krb5/* lib/kadm/* lib/krb425/* \
+       clients/* clients/kdestroy/* clients/kinit/* clients/klist/* \
+       clients/kpasswd/* \
+       config/* include/* include/kerberosIV/* \
+       include/krb5/* include/krb5/stock/* include/sys/* lib/* \
+       lib/crypto/* lib/crypto/crc32/* lib/crypto/des/* lib/crypto/dk/* \
+       lib/crypto/enc_provider/* lib/crypto/hash_provider/* \
+       lib/crypto/keyhash_provider/* lib/crypto/old/* lib/crypto/raw/* \
+       lib/crypto/sha1/* lib/crypto/md4/* lib/crypto/md5/* \
+       lib/des425/* lib/gssapi/* lib/gssapi/generic/* lib/gssapi/krb5/* \
+       lib/gssapi/mechglue/* lib/krb4/* \
        lib/krb5/* lib/krb5/asn.1/* lib/krb5/krb/* \
-       lib/krb5/ccache/* lib/krb5/ccache/file/* \
-       lib/krb5/ccache/stdio/* lib/krb5/error_tables/* \
-       lib/krb5/free/* lib/krb5/keytab/* lib/krb5/keytab/file/* \
-       lib/krb5/os/* lib/krb5/posix/* lib/krb5/rcache/* util/et/* \
-       util/profile/*
-
-WINFILES= windows/* windows/cns/* windows/wintel/* windows/gss/*
-
-MACFILES= mac/build/* mac/kconfig/* mac/libraries/* mac/telnet/*
-
-WINBINARYFILES=windows/cns/*.ico windows/wintel/*.ico windows/gss/*.ico
-
-WINEXCLUDE= LIB/KRB5.SAB \
-       INCLUDE/KRB5/AUTOCONF.H \
-       LIB/CRYPTO/MD4/T_MDDRIV LIB/CRYPTO/MD5/T_MDDRIV \
-       UTIL/PROFILE/TEST_PAR UTIL/PROFILE/TEST_PRO \
-       WINDOWS/CNS/*.ICO WINDOWS/WINTEL/*.ICO WINDOWS/GSS/*.ICO \
-       *.O *.A *.ZIP *.TAR
-
-NTEXCLUDE= ./lib/krb5.sab \
-       ./include/krb5/autoconf.h \
-       ./lib/crypto/md4/t_mddriv ./lib/crypto/md5/t_mddriv \
-       ./util/profile/test_par ./util/profile/test_pro \
-       windows/cns/*.ico windows/wintel/*.ico windows/gss/*.ico \
-       ./*.zip ./*.tar
-
-CLEANUP= util/profile/profile.h util/profile/prof_err.[ch] \
-       lib/krb5/error_tables/asn1_err.c lib/krb5/error_tables/kdb5_err.c \
-       lib/krb5/error_tables/krb5_err.c lib/krb5/error_tables/kv5m_err.c \
-       lib/krb5/error_tables/adm_err.c \
-       include/krb5/asn1_err.h include/krb5/kdb5_err.h \
-       include/krb5/krb5_err.h include/krb5/kv5m_err.h \
-       include/krb5/adm_err.h include/profile.h include/krb5.h \
-       lib/gssapi/generic/gssapi_err_generic.[ch] \
-       lib/gssapi/krb5/gssapi_err_krb5.[ch]
+       lib/krb5/ccache/* lib/krb5/ccache/file/* lib/krb5/ccache/memory/* \
+       lib/krb5/ccache/stdio/* lib/krb5/ccache/ccapi/* \
+       lib/krb5/error_tables/* \
+       lib/krb5/keytab/* lib/krb5/keytab/file/* lib/krb5/keytab/srvtab/* \
+       lib/krb5/os/* lib/krb5/posix/* lib/krb5/rcache/* \
+       util/* util/et/* util/profile/*
 
-kerbsrc.win: kerbsrc.zip
+WINFILES= util/windows/* windows/* windows/lib/* windows/cns/* \
+       windows/wintel/* windows/gss/* windows/gina/*
 
-kerbsrc.zip: awk-windows-mac
-       rm -f Makefile.bak
-       mv Makefile Makefile.bak
-       cp Makefile.in Makefile
-       rm -f kerbsrc.zip
-       $(ZIP) -Dlk kerbsrc.zip $(FILES) $(WINFILES) -x $(WINEXCLUDE)
-       $(ZIP) -Dk kerbsrc.zip $(WINBINARYFILES)
-       mv Makefile.bak Makefile
-       rm -f $(CLEANUP)
-
-kerbsrc-nt.zip: awk-windows-mac
-       rm -f Makefile.bak
-       mv Makefile Makefile.bak
-       cp Makefile.in Makefile
-       rm -f kerbsrc-nt.zip
-       $(ZIP) -Dl kerbsrc-nt.zip $(FILES) $(WINFILES) -x $(NTEXCLUDE)
-       $(ZIP) -D kerbsrc-nt.zip $(WINBINARYFILES)
-       mv Makefile.bak Makefile
-       rm -f $(CLEANUP)
+MACFILES= mac/* mac/libraries/* config/* include/* \
+       include/krb5/* include/krb5/stock/* include/sys/* \
+       ./patchlevel.h
 
-kerbsrc.mac: awk-windows-mac
-       tar cvf kerbsrc.tar `find $(FILES) $(MACFILES) -prune -type f -print | grep -v kerbsrc`
-       rm -f $(CLEANUP)
+WINBINARYFILES=        windows/*/*.ico windows/*/*.doc windows/*/*.hlp \
+       windows/*/*.hpj windows/lib/*.lib
 
 #
 # Part of building the PC release has to be done on Unix. This includes
 # anything the requires awk.
 #
+AWK = gawk
 AH  = util/et/et_h.awk
 AC  = util/et/et_c.awk
 INC = include/
@@ -269,24 +349,200 @@ GG  = lib/gssapi/generic/
 GK  = lib/gssapi/krb5/
 PR  = util/profile/
 
-awk-windows-mac:
-       gawk -f $(AH) outfile=$(INC)asn1_err.h $(ET)asn1_err.et
-       gawk -f $(AH) outfile=$(INC)kdb5_err.h $(ET)kdb5_err.et
-       gawk -f $(AH) outfile=$(INC)krb5_err.h $(ET)krb5_err.et
-       gawk -f $(AH) outfile=$(INC)kv5m_err.h $(ET)kv5m_err.et
-       gawk -f $(AH) outfile=$(INC)adm_err.h $(ET)adm_err.et
-       cat $(INC)/krb5.hin $(INC)/krb5_err.h $(INC)/kdb5_err.h \
-               $(INC)/kv5m_err.h $(INC)/asn1_err.h > $(INC)/krb5.h
-       gawk -f $(AC) outfile=$(ET)asn1_err.c $(ET)asn1_err.et
-       gawk -f $(AC) outfile=$(ET)kdb5_err.c $(ET)kdb5_err.et
-       gawk -f $(AC) outfile=$(ET)krb5_err.c $(ET)krb5_err.et
-       gawk -f $(AC) outfile=$(ET)kv5m_err.c $(ET)kv5m_err.et
-       gawk -f $(AC) outfile=$(ET)adm_err.c $(ET)adm_err.et
-       gawk -f $(AH) outfile=$(GG)gssapi_err_generic.h $(GG)gssapi_err_generic.et
-       gawk -f $(AC) outfile=$(GG)gssapi_err_generic.c $(GG)gssapi_err_generic.et
-       gawk -f $(AH) outfile=$(GK)gssapi_err_krb5.h $(GK)gssapi_err_krb5.et
-       gawk -f $(AC) outfile=$(GK)gssapi_err_krb5.c $(GK)gssapi_err_krb5.et
-       gawk -f $(AH) outfile=$(PR)prof_err.h $(PR)prof_err.et
-       gawk -f $(AC) outfile=$(PR)prof_err.c $(PR)prof_err.et
-       cat $(PR)/profile.hin $(PR)prof_err.h > $(PR)profile.h
-       cp $(PR)profile.h include/profile.h
+ETOUT =        $(INC)asn1_err.h $(ET)asn1_err.c \
+       $(INC)kdb5_err.h $(ET)kdb5_err.c \
+       $(INC)krb5_err.h $(ET)krb5_err.c \
+       $(INC)kv5m_err.h $(ET)kv5m_err.c \
+       $(INC)adm_err.h $(ET)adm_err.c \
+       $(INC)/kerberosIV/krb_err.h lib/krb4/krb_err.c \
+       $(PR)prof_err.h $(PR)prof_err.c \
+       $(GG)gssapi_err_generic.h $(GG)gssapi_err_generic.c \
+       $(GK)gssapi_err_krb5.h $(GK)gssapi_err_krb5.c
+
+HOUT = $(INC)krb5.h $(GG)gssapi.h $(PR)profile.h
+
+CLEANUP= Makefile $(ETOUT) $(HOUT) \
+       include/profile.h include/krb5/osconf.h \
+       winfile.list macfile.list
+
+
+kerbsrc.win: kerbsrc.zip
+
+winfile.list:
+       echo $(FILES) $(WINFILES) | tr ' ' \\012 | \
+               sed -f config/winexclude.sed > winfile.list
+
+MAC_SUBDIRS = lib util
+macfile.list:
+       /bin/sh mac/macfiles.sh $(MAC_SUBDIRS) > macfile.list
+       find $(MACFILES) -prune -type f -print | \
+               sed -f config/winexclude.sed >> macfile.list
+
+dos-Makefile:
+       cat config/win-pre.in Makefile.in config/win-post.in | \
+               sed -e "s/^##DOS##//" -e "s/^##DOS//" > Makefile.tmp
+       mv Makefile.tmp Makefile
+
+prep-windows: dos-Makefile awk-windows-mac
+
+krbsrc83.zip: krbsrc83-is-obsolete
+
+krbsrc83-is-obsolete:
+       @echo "Win16 and krbsrc83.zip are no longer supported."
+       @echo "We don't support building under 8.3 restricted filesystems"
+       @echo "anymore.  You can still build for Win32 on filesystems"
+       @echo "without 8.3 restrictions using kerbsrc.zip"
+       @echo " "
+
+kerbsrc.zip: dos-Makefile awk-windows-mac winfile.list
+       rm -f kerbsrc.zip
+       $(ZIP) -@Dl kerbsrc.zip < winfile.list
+       $(ZIP) -D kerbsrc.zip $(WINBINARYFILES)
+       rm -f $(CLEANUP)
+
+kerbsrc-nt.zip: kerbsrc-nt-is-obsolete
+
+kerbsrc-nt-is-obsolete:
+       @echo "kerbsrc-nt.zip is now obsolete.  Just use and build kerbsrc.zip"
+       @echo "We don't support building under 8.3 restricted filesystems"
+       @echo "anymore, so what was kerbsrc-nt.zip is now kerbsrc.zip."
+       @echo " "
+
+Macfile: macfile.list 
+       rm -f Macfile
+       sed -e 's|/|:|g' -e 's/^/:/' -e '/:.:/d' -e '/:mac:/d' macfile.list > macfile.maclist
+       grep '\.c$$' macfile.maclist > macsrcsgss
+       grep -v ':gssapi:' macsrcsgss > macsrcsk5
+       echo SRCS = `cat macsrcsgss` >> Macfile
+       echo SRCDIRS = `sed -n -e 's/\(.*:\)[^:]*\.c$$/ \1/p' macfile.maclist | sort -u` >> Macfile
+       echo GSSOBJS68K = `sed -e 's/$$/.68K.o/' -e 's/.*://' \
+               -e 's/^/:bin:68K:/' macsrcsgss` >> Macfile
+       echo GSSOBJS68KCFM = `sed -e 's/$$/.CFM68.o/' -e 's/.*://' \
+               -e 's/^/:bin:CFM-68K:/' macsrcsgss` >> Macfile
+       echo GSSOBJSPPC = `sed -e 's/$$/.PPC.o/' -e 's/.*://' \
+               -e 's/^/:bin:PPC:/' macsrcsgss` >> Macfile
+       echo K5OBJS68K = `sed -e 's/$$/.68K.o/' -e 's/.*://' \
+               -e 's/^/:bin:68K:/' macsrcsk5` >> Macfile
+       echo K5OBJS68KCFM = `sed -e 's/$$/.CFM68.o/' -e 's/.*://' \
+               -e 's/^/:bin:CFM-68K:/' macsrcsk5` >> Macfile
+       echo K5OBJSPPC = `sed -e 's/$$/.PPC.o/' -e 's/.*://' \
+               -e 's/^/:bin:PPC:/' macsrcsk5` >> Macfile
+       echo INCLUDES = `sed -n -e 's/\(.*:\)[^:]*\.h$$/-i \1/p' macfile.maclist | sort -u` >> Macfile
+       echo "" >> Macfile
+       tr '@/:\\' '\245:\304\266'< mac/Makefile.tmpl >> Macfile
+
+mac-bin-dirs:
+       rm -rf bin
+       mkdir bin bin/68K bin/CFM-68K bin/PPC
+       sh mac/mkbindirs.sh bin/68K $(MAC_SUBDIRS)
+       sh mac/mkbindirs.sh bin/CFM-68K $(MAC_SUBDIRS)
+       sh mac/mkbindirs.sh bin/PPC $(MAC_SUBDIRS)
+
+kerbsrc.mac.tar: awk-windows-mac macfile.list mac-bin-dirs Macfile
+       cp mac/libraries/autoconf.h include/autoconf.h
+       mv Macfile Makefile
+       tar cvf kerbsrc.mac.tar Makefile include/autoconf.h bin \
+               `cat macfile.list`
+       rm -f $(CLEANUP)
+       rm -rf bin
+       rm -f include/autoconf.h Makefile macsrc* macfile.maclist
+
+$(INC)asn1_err.h: $(AH) $(ET)asn1_err.et
+       $(AWK) -f $(AH) outfile=$@ $(ET)asn1_err.et
+$(INC)kdb5_err.h: $(AH) $(ET)kdb5_err.et
+       $(AWK) -f $(AH) outfile=$@ $(ET)kdb5_err.et
+$(INC)krb5_err.h: $(AH) $(ET)krb5_err.et
+       $(AWK) -f $(AH) outfile=$@ $(ET)krb5_err.et
+$(INC)kv5m_err.h: $(AH) $(ET)kv5m_err.et
+       $(AWK) -f $(AH) outfile=$@ $(ET)kv5m_err.et
+$(INC)adm_err.h: $(AH) $(ET)adm_err.et
+       $(AWK) -f $(AH) outfile=$@ $(ET)adm_err.et
+$(INC)/kerberosIV/krb_err.h: $(AH) lib/krb4/krb_err.et
+       $(AWK) -f $(AH) outfile=$@ lib/krb4/krb_err.et
+$(PR)prof_err.h: $(AH) $(PR)prof_err.et
+       $(AWK) -f $(AH) outfile=$@ $(PR)prof_err.et
+$(GG)gssapi_err_generic.h: $(AH) $(GG)gssapi_err_generic.et
+       $(AWK) -f $(AH) outfile=$@ $(GG)gssapi_err_generic.et
+$(GK)gssapi_err_krb5.h: $(AH) $(GK)gssapi_err_krb5.et
+       $(AWK) -f $(AH) outfile=$@ $(GK)gssapi_err_krb5.et
+
+$(ET)asn1_err.c: $(AC) $(ET)asn1_err.et
+       $(AWK) -f $(AC) outfile=$@ $(ET)asn1_err.et
+$(ET)kdb5_err.c: $(AC) $(ET)kdb5_err.et
+       $(AWK) -f $(AC) outfile=$@ $(ET)kdb5_err.et
+$(ET)krb5_err.c: $(AC) $(ET)krb5_err.et
+       $(AWK) -f $(AC) outfile=$@ $(ET)krb5_err.et
+$(ET)kv5m_err.c: $(AC) $(ET)kv5m_err.et
+       $(AWK) -f $(AC) outfile=$@ $(ET)kv5m_err.et
+$(ET)adm_err.c: $(AC) $(ET)adm_err.et
+       $(AWK) -f $(AC) outfile=$@ $(ET)adm_err.et
+lib/krb4/krb_err.c: $(AC) lib/krb4/krb_err.et
+       $(AWK) -f $(AC) outfile=$@ lib/krb4/krb_err.et
+$(PR)prof_err.c: $(AC) $(PR)prof_err.et
+       $(AWK) -f $(AC) outfile=$@ $(PR)prof_err.et
+$(GG)gssapi_err_generic.c: $(AC) $(GG)gssapi_err_generic.et
+       $(AWK) -f $(AC) outfile=$@ $(GG)gssapi_err_generic.et
+$(GK)gssapi_err_krb5.c: $(AC) $(GK)gssapi_err_krb5.et
+       $(AWK) -f $(AC) outfile=$@ $(GK)gssapi_err_krb5.et
+
+KRBHDEP = $(INC)krb5.hin $(INC)krb5_err.h $(INC)kdb5_err.h \
+       $(INC)kv5m_err.h $(INC)asn1_err.h
+
+$(INC)krb5.h: $(KRBHDEP)
+       rm -f $@
+       cat $(KRBHDEP) > $@
+$(PR)profile.h: $(PR)profile.hin $(PR)prof_err.h
+       rm -f $@
+       cat $(PR)profile.hin $(PR)prof_err.h > $@
+$(GG)gssapi.h: $(GG)gssapi.hin
+       rm -f $@
+       cat $(GG)gssapi.hin > $@
+
+awk-windows-mac: $(ETOUT) $(HOUT)
+
+#
+# The maybe-awk target needs to happen after AWK is defined.
+#
+
+##DOS##maybe-awk::
+##DOS##!ifdef WHICH_CMD
+##DOS##!if ![ $(WHICH_CMD) $(AWK) ]
+##DOS##maybe-awk:: awk-windows-mac
+##DOS##!endif
+##DOS##!endif
+
+clean-windows-mac:
+       rm -f $(CLEANUP)
+
+distclean-windows:
+       config\rm.bat $(CLEANUP:^/=^\)
+       config\rm.bat $(WINMAKEFILES)
+       config\rm.bat $(KBINDIR)\*.dll $(KBINDIR)\*.exe
+       @if exist $(KBINDIR)\nul rmdir $(KBINDIR)
+
+install-windows::
+       @if "$(KRB_INSTALL_DIR)"=="" @echo KRB_INSTALL_DIR is not defined!  Please define it.
+       @if "$(KRB_INSTALL_DIR)"=="" @dir /b \nul\nul
+       @if not exist "$(KRB_INSTALL_DIR)\$(NULL)" @echo The directory $(KRB_INSTALL_DIR) does not exist.  Please create it.
+       @if not exist "$(KRB_INSTALL_DIR)\$(NULL)" @dir /b $(KRB_INSTALL_DIR)\nul
+       @if not exist "$(KRB_INSTALL_DIR)\include\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\include"
+       @if not exist "$(KRB_INSTALL_DIR)\include\gssapi\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\include\gssapi"
+       @if not exist "$(KRB_INSTALL_DIR)\lib\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\lib"
+       @if not exist "$(KRB_INSTALL_DIR)\bin\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\bin"
+       $(CP) include\krb5.h "$(KRB_INSTALL_DIR)\include\."
+       $(CP) include\win-mac.h "$(KRB_INSTALL_DIR)\include\."
+       $(CP) include\profile.h "$(KRB_INSTALL_DIR)\include\."
+       $(CP) include\com_err.h "$(KRB_INSTALL_DIR)\include\."
+       $(CP) include\gssapi\gssapi.h "$(KRB_INSTALL_DIR)\include\gssapi\."
+       $(CP) include\gssapi\gssapi_krb5.h "$(KRB_INSTALL_DIR)\include\gssapi\."
+       $(CP) lib\$(OUTPRE)*.lib "$(KRB_INSTALL_DIR)\lib\."
+       $(CP) lib\$(OUTPRE)*.dll "$(KRB_INSTALL_DIR)\bin\."
+       $(CP) windows\cns\$(OUTPRE)krb5.exe "$(KRB_INSTALL_DIR)\bin\."
+       $(CP) windows\wintel\$(OUTPRE)telnet.exe "$(KRB_INSTALL_DIR)\bin\."
+       $(CP) windows\gss\$(OUTPRE)gss.exe "$(KRB_INSTALL_DIR)\bin\."
+       $(CP) clients\klist\$(OUTPRE)klist.exe "$(KRB_INSTALL_DIR)\bin\."
+       $(CP) clients\kinit\$(OUTPRE)kinit.exe "$(KRB_INSTALL_DIR)\bin\."
+       $(CP) clients\kdestroy\$(OUTPRE)kdestroy.exe "$(KRB_INSTALL_DIR)\bin\."
+       $(CP) clients\kpasswd\$(OUTPRE)kpasswd.exe "$(KRB_INSTALL_DIR)\bin\."
+       @if exist "$(KRB_INSTALL_DIR)\bin\krb4_32.dll" del "$(KRB_INSTALL_DIR)\bin\krb4_32.dll"
+       @if exist "$(KRB_INSTALL_DIR)\lib\krb4_32.lib" del "$(KRB_INSTALL_DIR)\lib\krb4_32.lib"