1 #!#############################################################################
3 #! Purpose: tmake template file from which makefile.dos is generated by running
4 #! tmake -t dos wxwin.pro -o makefile.dos
5 #! Author: Vadim Zeitlin
8 #!#############################################################################
10 #! include the code which parses filelist.txt file and initializes
11 #! %wxCommon, %wxGeneric and %wxMSW hashes.
12 IncludeTemplate("filelist.t");
14 #! now transform these hashes into $project tags
15 foreach $file (sort keys %wxGeneric) {
16 if ( $wxGeneric{$file} =~ /\b(PS|G|U)\b/ ) {
17 #! this file for some reason wasn't compiled for VC++ 1.52
18 next unless $file =~ /^prntdlgg\./;
21 $file =~ s/cp?p?$/obj/;
22 $project{"WXGENERICOBJS"} .= "\$(GENDIR)\\" . $file . " "
25 #! because we later search for " <filename> " in this string
26 $project{"WXCOBJS"} = " ";
28 foreach $file (sort keys %wxCommon) {
29 #! socket files don't compile under Win16 currently
30 next if $wxCommon{$file} =~ /\b(32|S)\b/;
32 $isCFile = $file =~ /\.c$/;
33 $file =~ s/cp?p?$/obj/;
34 $obj = "\$(COMMDIR)\\" . $file . " ";
35 $project{"WXCOMMONOBJS"} .= $obj;
36 $project{"WXCOBJS"} .= $obj if $isCFile;
39 foreach $file (sort keys %wxMSW) {
40 #! don't take files not appropriate for 16-bit Windows
41 next if $wxMSW{$file} =~ /\b(32|O)\b/;
43 $isCFile = $file =~ /\.c$/;
44 $file =~ s/cp?p?$/obj/;
45 $obj = "\$(MSWDIR)\\" . $file . " ";
46 #! have to split lib in 2 halves because otherwise it's too big
47 $project{$file =~ "^[a-o]" ? "WXMSWOBJS1" : "WXMSWOBJS2"} .= $obj;
48 $project{"WXCOBJS"} .= $obj if $isCFile;
51 # This file was automatically generated by tmake at #$ Now()
52 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T!
56 # Author: Julian Smart
59 # Copyright:(c) 1997, Julian Smart
63 # Makefile : Builds wxWindows library wx.lib for VC++ (16-bit)
66 # FINAL=1 argument to nmake to build version with no debugging info.
68 !include <..\makemsc.env>
73 # Please set these according to the settings in wx_setup.h, so we can include
74 # the appropriate libraries in wx.lib
76 # This one overrides the others, to be consistent with the settings in wx_setup.h
77 MINIMAL_WXWINDOWS_SETUP=0
82 !if "$(MINIMAL_WXWINDOWS_SETUP)" == "1"
91 # !if "$(USE_CTL3D)" == "1"
92 # PERIPH_LIBS=d:\msdev\lib\ctl3d32.lib $(PERIPH_LIBS)
95 !if "$(USE_XPM_IN_MSW)" == "1"
96 PERIPH_LIBS=$(WXDIR)\contrib\wxxpm\xpm.lib $(PERIPH_LIBS)
97 PERIPH_TARGET=xpm $(PERIPH_TARGET)
98 PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET)
102 PERIPH_TARGET=png zlib $(PERIPH_TARGET)
103 PERIPH_CLEAN_TARGET=clean_png clean_zlib $(PERIPH_CLEAN_TARGET)
110 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
113 $(COMMDIR)\y_tab.obj \
114 #$ ExpandList("WXCOMMONOBJS");
116 # we can't have all objects in one list because the library becomes too big
117 MSWOBJS1 = #$ ExpandList("WXMSWOBJS1");
119 MSWOBJS2 = #$ ExpandList("WXMSWOBJS2");
121 # TODO: Implement XPM and PNG targets in this makefile!
122 # $(OLEDIR)\xpmhand \
123 # $(OLEDIR)\pnghand \
125 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS1) $(MSWOBJS2)
127 # Normal, static library
128 all: $(DUMMYOBJ) $(WXDIR)\lib\wx1.lib $(WXDIR)\lib\wx2.lib $(WXDIR)\lib\wx3.lib $(WXDIR)\lib\wx4.lib
130 $(WXDIR)\lib\wx1.lib: $(COMMONOBJS) $(PERIPH_LIBS)
131 -erase $(WXDIR)\lib\wx1.lib
132 lib /PAGESIZE:128 @<<
135 $(COMMONOBJS) $(PERIPH_LIBS)
140 $(WXDIR)\lib\wx2.lib: $(GENERICOBJS)
141 -erase $(WXDIR)\lib\wx2.lib
142 lib /PAGESIZE:128 @<<
150 $(WXDIR)\lib\wx3.lib: $(MSWOBJS1)
151 -erase $(WXDIR)\lib\wx3.lib
152 lib /PAGESIZE:128 @<<
160 $(WXDIR)\lib\wx4.lib: $(MSWOBJS2)
161 -erase $(WXDIR)\lib\wx4.lib
162 lib /PAGESIZE:128 @<<
170 ########################################################
171 # Windows-specific objects
173 dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
175 cl $(CPPFLAGS) /YcWX/WXPREC.H $(DEBUG_FLAGS) /c /Tp $*.$(SRCSUFF)
178 #dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
179 # cl $(CPPFLAGS) /YcWX/WXPREC.H $(DEBUG_FLAGS) /c /Tp $*.$(SRCSUFF)
181 dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
183 $(CPPFLAGS) /YcWX/WXPREC.H /c /Tp $*.$(SRCSUFF)
187 $_ = $project{"WXMSWOBJS1"} . $project{"WXMSWOBJS2"} . $project{"WXCOMMONOBJS"} . $project{"WXGENERICOBJS"};
190 if ( $project{"WXCOBJS"} =~ / \Q$_\E / ) {
192 $text .= $_ . ': $*.c' . "\n" .
194 '$(CPPFLAGS2) /Fo$@ /c /Tc $*.c' . "\n" .
199 $text .= $_ . ': $*.$(SRCSUFF)' . "\n" .
201 '$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)' . "\n" .
207 $(COMMDIR)/y_tab.obj: $*.c $(COMMDIR)/lex_yy.c
209 $(CPPFLAGS2) -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@ /I ..\common /c $*.c
212 $(COMMDIR)/y_tab.c: $(COMMDIR)/dosyacc.c
213 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
215 $(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c
216 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
218 $(OBJECTS): $(WXDIR)/include/wx/setup.h
220 # Peripheral components
224 nmake -f makefile.dos FINAL=$(FINAL)
229 nmake -f makefile.dos clean
234 nmake -f makefile.dos FINAL=$(FINAL)
239 nmake -f makefile.dos clean
244 nmake -f makefile.dos FINAL=$(FINAL)
249 nmake -f makefile.dos clean
252 clean: $(PERIPH_CLEAN_TARGET)
258 cd $(WXDIR)\src\generic
262 cd $(WXDIR)\src\common
266 cd $(WXDIR)\src\msw\ole
276 makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
277 cd $(WXWIN)\distrib\msw\tmake
278 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
279 copy makefile.$(MFTYPE) $(WXWIN)\src\msw