WHAT=windows all:: outpre-dir 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 !if "$(CPU)" == "" CPU=i386 !endif # Change x86 or X86 to i386 !if ( "$(CPU)" == "X86" ) || ( "$(CPU)" == "x86" ) CPU=i386 !endif # CPU == X86 !if ( "$(CPU)" != "i386" ) && ( "$(CPU)" != "ALPHA" ) !error Must specify CPU environment variable ( CPU=i386, CPU=ALPHA) !endif # # End of figuring out CPU # # NOTE: ^ is an escape char for NMAKE. !ifdef NODEBUG OUTPRE_DBG=rel !else OUTPRE_DBG=dbg !endif OUTPRE1=obj OUTPRE2=$(OUTPRE1)\$(CPU) OUTPRE3=$(OUTPRE2)\$(OUTPRE_DBG) OUTPRE=$(OUTPRE3)^\ $(OUTPRE3): -@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). clean-windows-dir:: -@if exist $(OUTPRE3)\nul rmdir $(OUTPRE3) -@if exist $(OUTPRE2)\nul rmdir $(OUTPRE2) -@if exist $(OUTPRE1)\nul rmdir $(OUTPRE1) # Directory syntax: # # begin absolute path ABS=^\ # begin relative path REL= # up-directory U=.. # path separator S=^\ # this is magic... should only be used for preceding a program invocation C=.^\ srcdir = . SRCTOP = $(srcdir)\$(BUILDTOP) # # The name of the C compiler for the target # CC=cl /nologo CL= 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 # # 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 CCOPTS =/Od /ZI /W3 /MD $(PDB_OPTS) $(XTRA) $(DLL_FILE_DEF) CCOPTS2=/Od /ZI /W3 $(PDB_OPTS) $(XTRA) LOPTS=-debug !endif # XXX - NOTE: We should probably use DllMainCRTStartup LINKOPTS=-incremental:no $(LOPTS) -nologo -dll -entry:DllMain LINKOPTS2=-incremental:no $(LOPTS) -nologo !if defined(KRB5_USE_DNS) DNSFLAGS= -DKRB5_DNS_LOOKUP -DWSHELPER !else DNSFLAGS= !endif CPPFLAGS = -I$(SRCTOP)\include -I$(SRCTOP)\include\krb5 -I$(SRCTOP)\mit\windows\include $(DNSFLAGS) DEFS = $(CPPFLAGS) CFLAGS2 = $(CCOPTS2) $(DEFS) RM=$(BUILDTOP)\config\rm.bat LIBECHO=$(BUILDTOP)\util\windows\$(OUTPRE)libecho CP=copy MV=ren LN=copy LIBCMD=lib AWK=rem RC = rc CVTRES = cvtres WCONFIG_EXE=$(BUILDTOP)\$(OUTPRE)wconfig.exe WCONFIG=$(WCONFIG_EXE:.exe=) $(WCONFIG_FLAGS) 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= ARADD=rem RANLIB=rem ARCHIVE=rem LIBEXT=lib OBJEXT=obj EXEEXT=.exe MFLAGS=$(MAKEFLAGS) !ifdef MIGNORE MAKE=-$(MAKE) !endif {}.rc{$(OUTPRE)}.res: $(RC) $(RCFLAGS) -fo $@ -r $< {}.c{$(OUTPRE)}.obj: $(CC) $(CFLAGS) -Fo$(OUTPRE)\ -c $< {}.cxx{$(OUTPRE)}.obj: $(CC) $(CFLAGS) -Fo$(OUTPRE)\ -c $< {}.cpp{$(OUTPRE)}.obj: $(CC) $(CFLAGS) -Fo$(OUTPRE)\ -c $< # # End of Win32 pre-config lines (config/win-pre.in) #