diff options
author | Danilo Almeida <dalmeida@mit.edu> | 1999-05-17 22:36:25 +0000 |
---|---|---|
committer | Danilo Almeida <dalmeida@mit.edu> | 1999-05-17 22:36:25 +0000 |
commit | 1a296500cfa53385fc6acdd89d4cc6e23af67a5f (patch) | |
tree | 1efb0b9e5da1d64e18e5680f4985601b4ecb546f /src | |
parent | 408e8e1705bad975be91fa6dc193ed2f8292436a (diff) | |
download | krb5-1a296500cfa53385fc6acdd89d4cc6e23af67a5f.tar.gz krb5-1a296500cfa53385fc6acdd89d4cc6e23af67a5f.tar.xz krb5-1a296500cfa53385fc6acdd89d4cc6e23af67a5f.zip |
Remove win16 stuff. Add Win9x-compatible output directory creation.
Add more thorough cleanup of output files and directories. Use
latest and greatest (MSVC 6.0) debug flag.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11448 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r-- | src/config/ChangeLog | 7 | ||||
-rw-r--r-- | src/config/win-post.in | 40 | ||||
-rw-r--r-- | src/config/windows.in | 176 |
3 files changed, 98 insertions, 125 deletions
diff --git a/src/config/ChangeLog b/src/config/ChangeLog index 5e3a5d986..4ff7ddc09 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -1,3 +1,10 @@ +Mon May 17 12:26:12 1999 Danilo Almeida <dalmeida@mit.edu> + + * windows.in, win-post.in: Remove win16 stuff. Add + Win9x-compatible output directory creation. Add more + thorough cleanup of output files and directories. Use + latest and greatest (MSVC 6.0) debug flag. + Mon May 10 15:03:28 1999 Danilo Almeida <dalmeida@mit.edu> * windows.in, win-post.in: Build win32 binaries in diff --git a/src/config/win-post.in b/src/config/win-post.in index 856a9e7a1..5668331f8 100644 --- a/src/config/win-post.in +++ b/src/config/win-post.in @@ -1,4 +1,14 @@ -# config/win-post.in +# +# Start of Win32 post-config lines (config/win-post.in) +# + +!ifndef NO_OUTPRE +outpre-dir:: $(OUTPRE) +!else +outpre-dir:: +!endif + +# # put all:: first just in case no other rules occur here # all:: @@ -17,17 +27,11 @@ DLL_FILE_DEF=/DKRB5_DLL_FILE #(where there is already an explicit rule). !if !defined(ZIP) && !defined(WINFILES) Makefile: Makefile.in $(BUILDTOP)\config\windows.in $(BUILDTOP)\config\win-post.in - $(BUILDTOP)\wconfig $(BUILDTOP)\config < Makefile.in > Makefile + $(BUILDTOP)\$(OUTPRE)wconfig $(BUILDTOP)\config < Makefile.in > Makefile !endif -.c.obj: - $(CC) $(CFLAGS) /c $*.c !if defined(LIBNAME) -!ifndef WIN32 # WIN16 - $(LIBCMD) $(PAGESIZE) /nologo $(LIBNAME) -+$@; - -!else # WIN32 !if !defined(OBJFILELIST) OBJFILELIST=@$(OBJFILE) @@ -40,7 +44,6 @@ all-windows:: $(LIBNAME) $(LIBNAME): $(OBJFILEDEP) $(LIBCMD) /out:$(LIBNAME) /nologo $(OBJFILELIST) -!endif # WIN32 !endif # LIBNAME @@ -51,15 +54,11 @@ clean-windows:: !if defined(LIBOBJS) $(OBJFILE): $(LIBOBJS) $(RM) $(OBJFILE) -!ifndef WIN32 # WIN16 - $(CP) nul: $(OBJFILE) -!else # WIN32 !if defined(PREFIXDIR) $(LIBECHO) -p $(PREFIXDIR)\ $** > $(OBJFILE) !else $(LIBECHO) $** > $(OBJFILE) !endif # !PREFIXDIR -!endif # WIN32 !endif # LIBOBJS !endif # OBJFILE @@ -93,10 +92,6 @@ clean-unix:: if test -n "$(OBJS)" ; then $(RM) $(OBJS); else :; fi $(RM) .depend -clean-windows:: - $(RM) $(OUTPRE)*.$(OBJEXT) - $(RM) $(OUTPRE)msvc.pdb *.err $(OUTPRE)*.exe *.bak - !if defined(LIBNAME) clean-windows:: $(RM) $(LIBNAME) @@ -105,3 +100,14 @@ clean-windows:: clean-windows:: $(RM) $(OBJFILE) !endif + +clean-windows:: clean-windows-files clean-windows-dir + +# This needs to be in the post because we need RM to be defined in terms +# of BUILDTOP +clean-windows-files:: + $(RM) .\$(OUTPRE)*.obj .\$(OUTPRE)*.res + $(RM) .\$(OUTPRE)*.exe .\$(OUTPRE)*.dll + $(RM) .\$(OUTPRE)*.lib .\$(OUTPRE)*.pdb + $(RM) .\$(OUTPRE)*.exp .\$(OUTPRE)*.map + $(RM) .\$(OUTPRE)*.idb .\$(OUTPRE)*.ilk diff --git a/src/config/windows.in b/src/config/windows.in index 1c47bf346..646d3d9c8 100644 --- a/src/config/windows.in +++ b/src/config/windows.in @@ -1,13 +1,23 @@ -##WIN32##WIN32=1 WHAT=windows -!ifdef WIN32 +all:: outpre-dir -!ifndef NO_OUTPRE -all:: output-prefix-dir -!endif +all:: all-$(WHAT) +clean:: clean-$(WHAT) +install:: install-$(WHAT) +check:: check-$(WHAT) + +all-windows:: +clean-windows:: +install-windows:: +check-windows:: +all-windows:: Makefile +clean-windows:: Makefile + +# # Figure out the CPU +# !if !defined(CPU) || "$(CPU)" == "" CPU=$(PROCESSOR_ARCHITECTURE) !endif # CPU @@ -24,32 +34,33 @@ CPU=i386 !if ( "$(CPU)" != "i386" ) && ( "$(CPU)" != "ALPHA" ) !error Must specify CPU environment variable ( CPU=i386, CPU=ALPHA) !endif +# +# End of figuring out CPU +# + -# The OUTPRE lines below cannot end in a backslash. To remedy that, -# we add a space after the backslash. That works wonderfully, -# but be we have to watch out for Emacs makefile-mode, which -# will silently strip out such spaces! +# NOTE: ^ is an escape char for NMAKE. !ifdef NODEBUG -OUTPRE=obj\$(CPU)\rel^\ +OUTPRE_DBG=rel !else -OUTPRE=obj\$(CPU)\dbg^\ +OUTPRE_DBG=dbg !endif +OUTPRE1=obj +OUTPRE2=$(OUTPRE1)\$(CPU) +OUTPRE3=$(OUTPRE2)\$(OUTPRE_DBG) +OUTPRE=$(OUTPRE3)^\ -PDB_OPTS=-Fd$(OUTPRE)\ -FD - -!endif # WIN32 - -all:: all-$(WHAT) -clean:: clean-$(WHAT) -install:: install-$(WHAT) -check:: check-$(WHAT) - -all-windows:: -clean-windows:: -install-windows:: -check-windows:: +$(OUTPRE): + -@if not exist $(OUTPRE1)\nul mkdir $(OUTPRE1) + -@if not exist $(OUTPRE2)\nul mkdir $(OUTPRE2) + -@if not exist $(OUTPRE3)\nul mkdir $(OUTPRE3) + -@if exist $(OUTPRE3)\nul echo Output will go to $(OUTPRE3). + -@if not exist $(OUTPRE3)\nul echo Could not create $(OUTPRE3). -all-windows:: Makefile +clean-windows-dir:: + -@if exist $(OUTPRE3)\nul rmdir $(OUTPRE3) + -@if exist $(OUTPRE2)\nul rmdir $(OUTPRE2) + -@if exist $(OUTPRE1)\nul rmdir $(OUTPRE1) # Directory syntax: # @@ -67,64 +78,42 @@ C=.^\ srcdir = . SRCTOP = $(srcdir)\$(BUILDTOP) -# /* The name of the C compiler for the target */ -CC=cl /nologo -CL= # -# CCOPTS for DLL functions +# The name of the C compiler for the target # -!ifndef WIN32 # WIN16 -CCOPTS=/ALw /Zp /GD2s /Os /Zi /Od /W3 /Ld $(XTRA) $(DLL_FILE_DEF) -!else # WIN32 -!ifdef NODEBUG -CCOPTS=/Os /W3 /MD $(PDB_OPTS) $(XTRA) $(DLL_FILE_DEF) -!else -CCOPTS=/Os /Zi /Od /W3 /MD $(PDB_OPTS) $(XTRA) $(DLL_FILE_DEF) -!endif -!endif # WIN32 +CC=cl /nologo +CL= -# -# CCOPTS for non-DLL compiles -# -!ifndef WIN32 # WIN16 -CCOPTS2=/AL /Zp /GA /G2s /Os /Zi /Od /W3 $(XTRA) -!else # WIN32 -!ifdef NODEBUG -CCOPTS2=/Os /W3 $(PDB_OPTS) $(XTRA) -!else -CCOPTS2=/Os /Zi /Od /W3 $(PDB_OPTS) $(XTRA) -!endif -!endif # WIN32 -CPPFLAGS = -I$(SRCTOP)\include -I$(SRCTOP)\include\krb5 -DEFS = $(CPPFLAGS) -CFLAGS2 = $(CCOPTS2) $(DEFS) +PDB_OPTS=-Fd$(OUTPRE)\ -FD + +# /ZI gives better debug info in each object file (MSVC 6.0 or higher). +# /Zi gives debug info in each object file. +# /Gs Avoid stack probes (they don't seem to work anyway) +# /Os optimize for space. FIXME: Do not use /Ox; it miscompiles the DES lib! +# /Od disable optimization (for debugging) +# /MD (Win32) thread safe, ML would be single threaded, don't build with ML # -# LOPTS +# CCOPTS is for DLL compiles +# CCOPTS2 is for non-DLL compiles (EXEs, for example) # !ifdef NODEBUG +CCOPTS =/Os /W3 /MD $(PDB_OPTS) $(XTRA) $(DLL_FILE_DEF) +CCOPTS2=/Os /W3 $(PDB_OPTS) $(XTRA) LOPTS= !else -LOPTS=/debug +CCOPTS =/Od /ZI /W3 /MD $(PDB_OPTS) $(XTRA) $(DLL_FILE_DEF) +CCOPTS2=/Od /ZI /W3 $(PDB_OPTS) $(XTRA) +LOPTS=-debug !endif -# /Zi gives debug info in each object file. -# /Zp packs structures: Required for Windows API (but is not default!!!) -# /Za strict ansi compliance -# /ALw memory model: Large model for Windows DLL (SS != DS) -# /GD DLL code generation for Windows 3.0 and up, and defines _WINDOWS -# /Gs Avoid stack probes (they don't seem to work anyway) -# /Os optimize for space. FIXME: Do not use /Ox; it miscompiles the DES lib! -# /G2 generate 286 instructions (it complains if you ask for 386!) -# /Od disable optimization (for debugging) -# /MD (Win32) thread safe, ML would be single threaded, don't build with ML +# XXX - NOTE: We should probably use DllMainCRTStartup +LINKOPTS=-incremental:no $(LOPTS) -nologo -dll -entry:DllMain +LINKOPTS2=-incremental:no $(LOPTS) -nologo -DBG_LIB=/nologo /Zp /ALw /GD /Gs /Os /G2 /Zi /Od -# /Zi gives debug info in each object file. -# /Zp packs structures: Required for Windows API (but is not default!!!) -# /AL large memory model -# /Mq quickwin ascii stdio window, and defines _WINDOWS -DBG=/nologo /Zp /AL /Os /Mq /Zi /Od +CPPFLAGS = -I$(SRCTOP)\include -I$(SRCTOP)\include\krb5 +DEFS = $(CPPFLAGS) +CFLAGS2 = $(CCOPTS2) $(DEFS) RM=$(BUILDTOP)\config\rm.bat LIBECHO=$(BUILDTOP)\util\windows\$(OUTPRE)libecho @@ -132,30 +121,17 @@ CP=copy MV=ren LN=copy LIBCMD=lib -PAGESIZE=/pagesize:128 AWK=rem RC = rc CVTRES = cvtres -!ifndef WIN32 # WIN16 -WINBITS=16 -!else # WIN32 -WINBITS=32 -!endif # WIN32 - -CLIB=$(BUILDTOP)\lib\$(OUTPRE)comerr$(WINBITS).lib -PLIB=$(BUILDTOP)\lib\$(OUTPRE)xpprof$(WINBITS).lib -KLIB=$(BUILDTOP)\lib\$(OUTPRE)krb5_$(WINBITS).lib -K4LIB=$(BUILDTOP)\lib\krb4_16.lib -K4LIB=$(BUILDTOP)\lib\$(OUTPRE)krb4_$(WINBITS).lib - -!ifndef WIN32 # WIN16 -GLIB=$(BUILDTOP)\lib\gssapi.lib -WLIB=$(BUILDTOP)\lib\winsock.lib -!else # WIN32 +CLIB=$(BUILDTOP)\lib\$(OUTPRE)comerr32.lib +PLIB=$(BUILDTOP)\lib\$(OUTPRE)xpprof32.lib +KLIB=$(BUILDTOP)\lib\$(OUTPRE)krb5_32.lib +K4LIB=$(BUILDTOP)\lib\$(OUTPRE)krb4_32.lib + GLIB=$(BUILDTOP)\lib\$(OUTPRE)gssapi32.lib WLIB= -!endif # WIN32 ARADD=rem RANLIB=rem @@ -167,13 +143,6 @@ EXEEXT=.exe MFLAGS=$(MAKEFLAGS) - -!ifdef WIN32 -output-prefix-dir:: $(OUTPRE) - -$(OUTPRE): - -if not exist $(OUTPRE) mkdir $(OUTPRE) - {}.rc{$(OUTPRE)}.res: $(RC) $(RCFLAGS) -fo $@ -r $< @@ -181,21 +150,12 @@ $(OUTPRE): $(CC) $(CFLAGS) -Fo$(OUTPRE)\ -c $< {}.cxx{$(OUTPRE)}.obj: - $(CXX) $(CXXFLAGS) -Fo$(OUTPRE)\ -c $< + $(CC) $(CFLAGS) -Fo$(OUTPRE)\ -c $< {}.cpp{$(OUTPRE)}.obj: - $(CPP) $(CPPFLAGS) -Fo$(OUTPRE)\ -c $< - -#{}.c{$(OUTPRE)}.sbr: -# $(C_RULE) -#{}.cxx{$(OUTPRE)}.sbr: -# $(CXX_RULE) -#{}.cpp{$(OUTPRE)}.sbr: -# $(CXX_RULE) -!endif # WIN32 - + $(CC) $(CFLAGS) -Fo$(OUTPRE)\ -c $< # -# End of Microsoft Windows config lines +# End of Win32 pre-config lines (config/windows.in) # |