151fac6873b01584722a49557c5e4946929eaea7
[krb5.git] / src / config / win-post.in
1 #
2 # Start of Win32 post-config lines (config/win-post.in)
3 #
4
5 setup-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)
10 outpre-dir::
11 !else
12 outpre-dir:: $(OUTPRE3)$(DIRNUL)
13 !endif
14
15 #
16 # put all:: first just in case no other rules occur here
17 #
18 all::
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)
25 DLL_FILE_DEF=/D$(DLL_EXP_TYPE)_DLL_FILE
26 !else
27 DLL_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(ZIP) && !defined(WINFILES)
33 Makefile: Makefile.in $(BUILDTOP)\config\win-pre.in $(BUILDTOP)\config\win-post.in
34         $(WCONFIG) $(BUILDTOP)\config < Makefile.in > Makefile
35 !endif
36
37 !if  ("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64" ) || ("$(CPU)" == "ALPHA64" )
38 !if defined(WIN64LIBNAME)
39 LIBNAME=$(WIN64LIBNAME)
40 !endif
41 !if defined(WIN64OBJFILE)
42 OBJFILE=$(WIN64OBJFILE)
43 !endif
44 !endif
45
46 !if defined(LIBNAME)
47
48 !if !defined(OBJFILELIST)
49 OBJFILELIST=@$(OBJFILE)
50 !endif
51 !if !defined(OBJFILEDEP)
52 OBJFILEDEP=$(OBJFILE)
53 !endif
54
55 all-windows:: $(LIBNAME)
56 $(LIBNAME): $(OBJFILEDEP)
57         $(LIBCMD) /out:$(LIBNAME) /nologo $(OBJFILELIST)
58
59 !endif # LIBNAME
60
61
62 !if defined(OBJFILE)
63 all-windows:: $(OBJFILE)
64 !if defined(LIBOBJS)
65 $(OBJFILE): $(LIBOBJS)
66         if exist $(OBJFILE) del $(OBJFILE)
67 !if defined(PREFIXDIR)
68         $(LIBECHO) -p $(PREFIXDIR)\ $** > $(OBJFILE)
69 !else
70         $(LIBECHO) $** > $(OBJFILE)
71 !endif # !PREFIXDIR
72 !endif # LIBOBJS
73 !endif # OBJFILE
74
75
76 check::
77 check-windows::
78
79 !if defined(LIBNAME)
80 clean-windows::
81 # NO LONGER NEEDED BECAUSE WE CLEAN OUT THE DIR...
82 #       if exist $(LIBNAME) del $(LIBNAME)
83 !endif
84 !if defined(OBJFILE)
85 clean-windows::
86 # NO LONGER NEEDED BECAUSE WE CLEAN OUT THE DIR...
87 #       if exist $(OBJFILE) del $(OBJFILE)
88 !endif
89
90 clean-windows:: clean-windows-files clean-windows-dir
91
92
93 # This needs to be in the post because we need RM to be defined in terms
94 # of BUILDTOP
95 clean-windows-files::
96 !if "$(OUTPRE3)" == ""
97 !error ASSERTION FAILURE: OUTPRE3 must be defined!!!
98 !endif
99 !if "$(OS)" == "Windows_NT"
100         @if exist $(OUTPRE3)$(DIRNUL) rd /s/q $(OUTPRE3)
101 !else
102         @if exist $(OUTPRE3)$(DIRNUL) deltree /y $(OUTPRE3)
103 !endif
104 !if 0
105         $(RM) .\$(OUTPRE)*.obj .\$(OUTPRE)*.res
106         $(RM) .\$(OUTPRE)*.exe .\$(OUTPRE)*.dll
107         $(RM) .\$(OUTPRE)*.lib .\$(OUTPRE)*.pdb
108         $(RM) .\$(OUTPRE)*.exp .\$(OUTPRE)*.map
109         $(RM) .\$(OUTPRE)*.idb .\$(OUTPRE)*.ilk
110         $(RM) .\$(OUTPRE)*.manifest
111 !endif
112
113 # Dependencies
114 !if exist($(srcdir)/deps)
115 !include $(srcdir)/deps
116 !endif