]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/tmake/dos.t
removed libxpm from templates
[wxWidgets.git] / distrib / msw / tmake / dos.t
1 #!#############################################################################
2 #! File: dos.t
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
6 #! Created: 14.07.99
7 #! Version: $Id$
8 #!#############################################################################
9 #${
10 #! include the code which parses filelist.txt file and initializes
11 #! %wxCommon, %wxGeneric and %wxMSW hashes.
12 IncludeTemplate("filelist.t");
13
14 #! now transform these hashes into $project tags
15 foreach $file (sort keys %wxGeneric) {
16 if ( $wxGeneric{$file} =~ /\b(PS|G|U)\b/ ) {
17 #! Need this file too since it has wxGenericPageSetupDialog
18 next unless $file =~ /^prntdlgg\./;
19 }
20
21 $file =~ s/cp?p?$/obj/;
22 $project{"WXGENERICOBJS"} .= "\$(GENDIR)\\" . $file . " "
23 }
24
25 #! because we later search for " <filename> " in this string
26 $project{"WXCOBJS"} = " ";
27
28 foreach $file (sort keys %wxCommon) {
29 #! socket files don't compile under Win16 currently
30 next if $wxCommon{$file} =~ /\b(32|S)\b/;
31
32 $isCFile = $file =~ /\.c$/;
33 $file =~ s/cp?p?$/obj/;
34 $obj = "\$(COMMDIR)\\" . $file . " ";
35 #! $project{"WXCOMMONOBJS"} .= $obj;
36 #! have to split lib in 2 halves because otherwise it's too big
37 $project{$file =~ "^[a-o]" ? "WXCOMMONOBJS1" : "WXCOMMONOBJS2"} .= $obj;
38 $project{"WXCOBJS"} .= $obj if $isCFile;
39 }
40
41 foreach $file (sort keys %wxMSW) {
42 #! don't take files not appropriate for 16-bit Windows
43 next if $wxMSW{$file} =~ /\b(32|O)\b/;
44
45 $isCFile = $file =~ /\.c$/;
46 $file =~ s/cp?p?$/obj/;
47 $obj = "\$(MSWDIR)\\" . $file . " ";
48 #! have to split lib in 2 halves because otherwise it's too big
49 $project{$file =~ "^[a-o]" ? "WXMSWOBJS1" : "WXMSWOBJS2"} .= $obj;
50 $project{"WXCOBJS"} .= $obj if $isCFile;
51 }
52 #$}
53 # This file was automatically generated by tmake at #$ Now()
54 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T!
55
56 #
57 # File: makefile.dos
58 # Author: Julian Smart
59 # Created: 1997
60 # Updated:
61 # Copyright:(c) 1997, Julian Smart
62 #
63 # "%W% %G%"
64 #
65 # Makefile : Builds wxWindows library wx.lib for VC++ (16-bit)
66 # Arguments:
67 #
68 # FINAL=1 argument to nmake to build version with no debugging info.
69 #
70 !include <..\makemsc.env>
71
72 LIBTARGET=$(WXLIB)
73 DUMMYOBJ=dummy.obj
74
75 # Please set these according to the settings in wx_setup.h, so we can include
76 # the appropriate libraries in wx.lib
77
78 # This one overrides the others, to be consistent with the settings in wx_setup.h
79 MINIMAL_WXWINDOWS_SETUP=0
80
81 USE_CTL3D=1
82
83 !if "$(MINIMAL_WXWINDOWS_SETUP)" == "1"
84 USE_CTL3D=0
85 USE_XPM_IN_MSW=0
86 !endif
87
88 PERIPH_LIBS=
89 PERIPH_TARGET=
90 PERIPH_CLEAN_TARGET=
91
92 # !if "$(USE_CTL3D)" == "1"
93 # PERIPH_LIBS=d:\msdev\lib\ctl3d32.lib $(PERIPH_LIBS)
94 # !endif
95
96 # PNG and Zlib
97 PERIPH_TARGET=png zlib $(PERIPH_TARGET)
98 PERIPH_CLEAN_TARGET=clean_png clean_zlib $(PERIPH_CLEAN_TARGET)
99
100 GENDIR=..\generic
101 COMMDIR=..\common
102 OLEDIR=.\ole
103 MSWDIR=.
104
105 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
106
107 # we can't have all objects in one list because the library becomes too big
108 COMMONOBJS1 = \
109 $(COMMDIR)\y_tab.obj \
110 #$ ExpandList("WXCOMMONOBJS1");
111
112 COMMONOBJS2 = \
113 #$ ExpandList("WXCOMMONOBJS2");
114
115 # we can't have all objects in one list because the library becomes too big
116 MSWOBJS1 = #$ ExpandList("WXMSWOBJS1");
117
118 MSWOBJS2 = #$ ExpandList("WXMSWOBJS2");
119
120 # TODO: Implement XPM and PNG targets in this makefile!
121 # $(OLEDIR)\pnghand \
122
123 OBJECTS = $(COMMONOBJS1) $(COMMONOBJS2) $(GENERICOBJS) $(MSWOBJS1) $(MSWOBJS2)
124
125 # Normal, static library
126 all: $(DUMMYOBJ) $(WXDIR)\lib\wx1.lib $(WXDIR)\lib\wx2.lib $(WXDIR)\lib\wx3.lib $(WXDIR)\lib\wx4.lib $(WXDIR)\lib\wx5.lib
127
128 $(WXDIR)\lib\wx1.lib: $(COMMONOBJS1) $(PERIPH_LIBS)
129 -erase $(WXDIR)\lib\wx1.lib
130 lib /PAGESIZE:128 @<<
131 $(WXDIR)\lib\wx1.lib
132 y
133 $(COMMONOBJS1) $(PERIPH_LIBS)
134 nul
135 ;
136 <<
137
138 $(WXDIR)\lib\wx2.lib: $(COMMONOBJS2)
139 -erase $(WXDIR)\lib\wx2.lib
140 lib /PAGESIZE:128 @<<
141 $(WXDIR)\lib\wx2.lib
142 y
143 $(COMMONOBJS2)
144 nul
145 ;
146 <<
147
148 $(WXDIR)\lib\wx3.lib: $(GENERICOBJS)
149 -erase $(WXDIR)\lib\wx3.lib
150 lib /PAGESIZE:128 @<<
151 $(WXDIR)\lib\wx3.lib
152 y
153 $(GENERICOBJS)
154 nul
155 ;
156 <<
157
158 $(WXDIR)\lib\wx4.lib: $(MSWOBJS1)
159 -erase $(WXDIR)\lib\wx4.lib
160 lib /PAGESIZE:128 @<<
161 $(WXDIR)\lib\wx4.lib
162 y
163 $(MSWOBJS1)
164 nul
165 ;
166 <<
167
168 $(WXDIR)\lib\wx5.lib: $(MSWOBJS2)
169 -erase $(WXDIR)\lib\wx5.lib
170 lib /PAGESIZE:128 @<<
171 $(WXDIR)\lib\wx5.lib
172 y
173 $(MSWOBJS2)
174 nul
175 ;
176 <<
177
178 ########################################################
179 # Windows-specific objects
180
181 dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
182 cl @<<
183 cl $(CPPFLAGS) /YcWX/WXPREC.H $(DEBUG_FLAGS) /c /Tp $*.$(SRCSUFF)
184 <<
185
186 #dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
187 # cl $(CPPFLAGS) /YcWX/WXPREC.H $(DEBUG_FLAGS) /c /Tp $*.$(SRCSUFF)
188
189 dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
190 cl @<<
191 $(CPPFLAGS) /YcWX/WXPREC.H /c /Tp $*.$(SRCSUFF)
192 <<
193
194 #${
195 $_ = $project{"WXMSWOBJS1"} . $project{"WXMSWOBJS2"} . $project{"WXCOMMONOBJS1"} . $project{"WXCOMMONOBJS2"} . $project{"WXGENERICOBJS"};
196 my @objs = split;
197 foreach (@objs) {
198 if ( $project{"WXCOBJS"} =~ / \Q$_\E / ) {
199 s:\\:/:;
200 $text .= $_ . ': $*.c' . "\n" .
201 ' cl @<<' . "\n" .
202 '$(CPPFLAGS2) /Fo$@ /c /Tc $*.c' . "\n" .
203 "<<\n\n";
204 }
205 else {
206 s:\\:/:;
207 $text .= $_ . ': $*.$(SRCSUFF)' . "\n" .
208 ' cl @<<' . "\n" .
209 '$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)' . "\n" .
210 "<<\n\n";
211 }
212 }
213 #$}
214
215 $(COMMDIR)/y_tab.obj: $*.c $(COMMDIR)/lex_yy.c
216 cl @<<
217 $(CPPFLAGS2) -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@ /I ..\common /c $*.c
218 <<
219
220 $(COMMDIR)/y_tab.c: $(COMMDIR)/dosyacc.c
221 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
222
223 $(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c
224 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
225
226 $(OBJECTS): $(WXDIR)/include/wx/setup.h
227
228 # Peripheral components
229
230 zlib:
231 cd $(WXDIR)\src\zlib
232 nmake -f makefile.dos FINAL=$(FINAL)
233 cd $(WXDIR)\src\msw
234
235 clean_zlib:
236 cd $(WXDIR)\src\zlib
237 nmake -f makefile.dos clean
238 cd $(WXDIR)\src\msw
239
240 png:
241 cd $(WXDIR)\src\png
242 nmake -f makefile.dos FINAL=$(FINAL)
243 cd $(WXDIR)\src\msw
244
245 clean_png:
246 cd $(WXDIR)\src\png
247 nmake -f makefile.dos clean
248 cd $(WXDIR)\src\msw
249
250 clean: $(PERIPH_CLEAN_TARGET)
251 -erase *.obj
252 -erase ..\lib\*.lib
253 -erase *.pdb
254 -erase *.sbr
255 -erase *.pch
256 cd $(WXDIR)\src\generic
257 -erase *.pdb
258 -erase *.sbr
259 -erase *.obj
260 cd $(WXDIR)\src\common
261 -erase *.pdb
262 -erase *.sbr
263 -erase *.obj
264 cd $(WXDIR)\src\msw\ole
265 -erase *.pdb
266 -erase *.sbr
267 -erase *.obj
268 cd $(WXDIR)\src\msw
269
270 cleanall: clean
271
272
273 MFTYPE=dos
274 makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
275 cd $(WXWIN)\distrib\msw\tmake
276 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
277 copy makefile.$(MFTYPE) $(WXWIN)\src\msw