2 # Start of Win32 post-config lines (config/win-post.in)
6 @set C_RULE_PRINT= $(C_RULE_PRINT)
9 !if defined(NO_OUTPRE) || defined(NO_OUTDIR)
12 outpre-dir:: $(OUTPRE3)$(DIRNUL)
16 # put all:: first just in case no other rules occur here
21 # Set the #define to indicate that we are compiling a DLL. We default to
22 # compiling the Kerberos library
24 !if defined(DLL_EXP_TYPE)
25 DLL_FILE_DEF=/D$(DLL_EXP_TYPE)_DLL_FILE
27 DLL_FILE_DEF=/DKRB5_DLL_FILE
30 # Build the Makefile unless we are in the top-level
31 #(where there is already an explicit rule).
32 !if !defined(ZIP) && !defined(WINFILES)
33 Makefile: Makefile.in $(BUILDTOP)\config\win-pre.in $(BUILDTOP)\config\win-post.in
34 $(WCONFIG) $(BUILDTOP)\config < Makefile.in > Makefile
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)
46 @for %d in ($(WINSUBDIRS)) do @(echo Making in $(mydir)\%d && \
47 pushd %d && $(MAKE) -$(MFLAGS) && popd) || exit 1
48 @echo Making in $(mydir)
49 all-windows:: all-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)
55 clean-windows:: clean-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)
61 check-windows:: check-recurse
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)
68 LIBNAME=$(WIN64LIBNAME)
70 !if defined(WIN64OBJFILE)
71 OBJFILE=$(WIN64OBJFILE)
75 # Build a library if LIBNAME is defined.
78 !if !defined(OBJFILELIST)
79 OBJFILELIST=@$(OBJFILE)
81 !if !defined(OBJFILEDEP)
85 all-windows:: $(LIBNAME)
86 $(LIBNAME): $(OBJFILEDEP)
87 $(LIBCMD) /out:$(LIBNAME) /nologo $(OBJFILELIST)
92 # Build an object file list if OBJFILE is defined.
94 all-windows:: $(OBJFILE)
96 $(OBJFILE): $(LIBOBJS)
97 if exist $(OBJFILE) del $(OBJFILE)
98 !if defined(PREFIXDIR)
99 $(LIBECHO) -p $(PREFIXDIR)\ $** > $(OBJFILE)
101 $(LIBECHO) $** > $(OBJFILE)
110 clean-windows:: clean-windows-files clean-windows-dir
113 # This needs to be in the post because we need RM to be defined in terms
115 clean-windows-files::
116 !if "$(OUTPRE3)" == ""
117 !error ASSERTION FAILURE: OUTPRE3 must be defined!!!
119 !if "$(OS)" == "Windows_NT"
120 @if exist $(OUTPRE3)$(DIRNUL) rd /s/q $(OUTPRE3)
122 @if exist $(OUTPRE3)$(DIRNUL) deltree /y $(OUTPRE3)
125 $(RM) .\$(OUTPRE)*.obj .\$(OUTPRE)*.res
126 $(RM) .\$(OUTPRE)*.exe .\$(OUTPRE)*.dll
127 $(RM) .\$(OUTPRE)*.lib .\$(OUTPRE)*.pdb
128 $(RM) .\$(OUTPRE)*.exp .\$(OUTPRE)*.map
129 $(RM) .\$(OUTPRE)*.idb .\$(OUTPRE)*.ilk
130 $(RM) .\$(OUTPRE)*.manifest
134 !if exist($(srcdir)/deps)
135 !include $(srcdir)/deps