1# 2# Start of Win32 post-config lines (config/win-post.in) 3# 4 5setup-msg: 6 @set C_RULE_PRINT= $(C_RULE_PRINT) 7 @set DO_C_RULE_PRINT=1 8 9!if defined(NO_OUTPRE) || defined(NO_OUTDIR) 10outpre-dir: 11!else 12outpre-dir: $(OUTPRE3)$(DIRNUL) 13!endif 14 15# 16# put all: first just in case no other rules occur here 17# 18all: 19 20# 21# Set the #define to indicate that we are compiling a DLL. We default to 22# compiling the Kerberos library 23# 24!if defined(DLL_EXP_TYPE) 25DLL_FILE_DEF=/D$(DLL_EXP_TYPE)_DLL_FILE 26!else 27DLL_FILE_DEF=/DKRB5_DLL_FILE 28!endif 29 30# Build the Makefile unless we are in the top-level 31#(where there is already an explicit rule). 32!if !defined(TOPLEVEL) 33Makefile: Makefile.in $(BUILDTOP)\config\win-pre.in $(BUILDTOP)\config\win-post.in 34 $(WCONFIG) $(BUILDTOP)\config < Makefile.in > Makefile 35!endif 36 37# Recurse into subdirs if WINSUBDIRS or SUBDIRS is defined. Makefiles 38# can depend on all-recurse, clean-recurse, or check-recurse to perform 39# actions after recursion. 40!if defined(SUBDIRS) && !defined(WINSUBDIRS) 41WINSUBDIRS=$(SUBDIRS) 42!endif 43!ifdef WINSUBDIRS 44 45all-recurse: 46 @for %d in ($(WINSUBDIRS)) do @(echo Making in $(mydir)\%d && \ 47 pushd %d && $(MAKE) -$(MFLAGS) && popd) || exit 1 48 @echo Making in $(mydir) 49all-windows: all-recurse 50 51clean-recurse: 52 @for %d in ($(WINSUBDIRS)) do @(echo Making clean in $(mydir)\%d && \ 53 pushd %d && $(MAKE) -$(MFLAGS) clean && popd) || exit 1 54 @echo Making clean in $(mydir) 55clean-windows:: clean-recurse 56 57check-recurse: 58 @for %d in ($(WINSUBDIRS)) do @(echo Making check in $(mydir)\%d && \ 59 pushd %d && $(MAKE) -$(MFLAGS) check && popd) || exit 1 60 @echo Making check in $(mydir) 61check-windows: check-recurse 62 63!endif # WINSUBDIRS 64 65# Use 64-bit LIBNAME and OBJFILE on 64-bit platforms, if defined. 66!if ("$(CPU)" == "IA64") || ("$(CPU)" == "AMD64") || ("$(CPU)" == "ALPHA64") 67!if defined(WIN64LIBNAME) 68LIBNAME=$(WIN64LIBNAME) 69!endif 70!if defined(WIN64OBJFILE) 71OBJFILE=$(WIN64OBJFILE) 72!endif 73!endif 74 75# Build a library if LIBNAME is defined. 76!if defined(LIBNAME) 77 78!if !defined(OBJFILELIST) 79OBJFILELIST=@$(OBJFILE) 80!endif 81!if !defined(OBJFILEDEP) 82OBJFILEDEP=$(OBJFILE) 83!endif 84 85all-windows: $(LIBNAME) 86$(LIBNAME): $(OBJFILEDEP) 87 $(LIBCMD) /out:$(LIBNAME) /nologo $(OBJFILELIST) 88 89!endif # LIBNAME 90 91 92# Build an object file list if OBJFILE is defined. 93!if defined(OBJFILE) 94all-windows: $(OBJFILE) 95!if defined(LIBOBJS) 96$(OBJFILE): $(LIBOBJS) 97 if exist $(OBJFILE) del $(OBJFILE) 98!if defined(PREFIXDIR) 99 $(LIBECHO) -p $(PREFIXDIR)\ $** > $(OBJFILE) 100!else 101 $(LIBECHO) $** > $(OBJFILE) 102!endif # !PREFIXDIR 103!endif # LIBOBJS 104!endif # OBJFILE 105 106 107check: 108check-windows: 109 110clean-windows:: clean-windows-files clean-windows-dir 111 112 113# This needs to be in the post because we need RM to be defined in terms 114# of BUILDTOP 115clean-windows-files: 116!if "$(OUTPRE3)" == "" 117!error ASSERTION FAILURE: OUTPRE3 must be defined!!! 118!endif 119!if "$(OS)" == "Windows_NT" 120 @if exist $(OUTPRE3)$(DIRNUL) rd /s/q $(OUTPRE3) 121!else 122 @if exist $(OUTPRE3)$(DIRNUL) deltree /y $(OUTPRE3) 123!endif 124 125# Dependencies 126!if exist($(srcdir)/deps) 127!include $(srcdir)/deps 128!endif 129