]>
Commit | Line | Data |
---|---|---|
1 | #!############################################################################# | |
2 | #! File: b32.t | |
3 | #! Purpose: tmake template file from which makefile.b32 is generated by running | |
4 | #! tmake -t b32 wxwin.pro | |
5 | #! Author: Vadim Zeitlin | |
6 | #! Created: 14.07.99 | |
7 | #! Version: $Id$ | |
8 | #!############################################################################# | |
9 | ||
10 | #${ | |
11 | #! include the code which parses filelist.txt file and initializes | |
12 | #! %wxCommon, %wxGeneric and %wxMSW hashes. | |
13 | IncludeTemplate("filelist.t"); | |
14 | ||
15 | #! now transform these hashes into $project tags | |
16 | foreach $file (sort keys %wxGeneric) { | |
17 | my $tag = ""; | |
18 | next if $wxGeneric{$file} =~ /\b(PS|G|16|U)\b/; | |
19 | ||
20 | $file =~ s/cp?p?$/obj/; | |
21 | $project{"WXGENERICOBJS"} .= "\$(MSWDIR)\\" . $file . " " | |
22 | } | |
23 | ||
24 | foreach $file (sort keys %wxCommon) { | |
25 | $isCFile = $file =~ /\.c$/; | |
26 | $file =~ s/cp?p?$/obj/; | |
27 | $obj = "\$(MSWDIR)\\" . $file . " "; | |
28 | $project{"WXCOMMONOBJS"} .= $obj; | |
29 | $project{"WXCOBJS"} .= $obj if $isCFile; | |
30 | } | |
31 | ||
32 | foreach $file (sort keys %wxMSW) { | |
33 | next if $wxMSW{$file} =~ /\b16\b/; | |
34 | ||
35 | if ( $file =~ /^automtn/ ) { | |
36 | #! comment in old makefile.b32 seems to imply that this file can't | |
37 | #! be compiled with Borland (leads to crash in oleauto sample) | |
38 | next; | |
39 | } | |
40 | ||
41 | $isCFile = $file =~ /\.c$/; | |
42 | ||
43 | my $isOleObj = $wxMSW{$file} =~ /\bO\b/; | |
44 | $file =~ s/cp?p?$/obj/; | |
45 | my $obj = "\$(MSWDIR)\\" . $file . " "; | |
46 | ||
47 | $project{"WXMSWOBJS"} .= $obj; | |
48 | if ( $isOleObj ) { | |
49 | #! remember that this file is in ole subdir | |
50 | $project{"WXOLEOBJS"} .= $obj; | |
51 | } | |
52 | $project{"WXCOBJS"} .= $obj if $isCFile; | |
53 | } | |
54 | #$} | |
55 | ||
56 | # This file was automatically generated by tmake at #$ Now() | |
57 | # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T! | |
58 | ||
59 | # | |
60 | # File: makefile.b32 | |
61 | # Author: Julian Smart | |
62 | # Created: 1998 | |
63 | # Updated: | |
64 | # Copyright: | |
65 | # | |
66 | # "%W% %G%" | |
67 | # | |
68 | # Makefile : Builds wxWindows library wx.lib for MS Windows, | |
69 | # and Borland C++ (32-bit). | |
70 | ||
71 | !if "$(BCCDIR)" == "" | |
72 | !error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 | |
73 | !endif | |
74 | ||
75 | !if "$(WXWIN)" == "" | |
76 | !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx | |
77 | !endif | |
78 | ||
79 | WXDIR = $(WXWIN) | |
80 | ||
81 | # Set all these to 1 if you want to build a dynamic library | |
82 | !if "$(DLL)" == "1" | |
83 | WXMAKINGDLL=1 | |
84 | WXBUILDDLL=1 | |
85 | !endif | |
86 | ||
87 | !include $(WXDIR)\src\makeb32.env | |
88 | ||
89 | # Please set these according to the settings in wx_setup.h, so we can include | |
90 | # the appropriate libraries in wx.lib | |
91 | USE_CTL3D=0 | |
92 | USE_XPM_IN_MSW=0 | |
93 | ||
94 | PERIPH_LIBS= | |
95 | PERIPH_TARGET= | |
96 | PERIPH_CLEAN_TARGET= | |
97 | ||
98 | !if "$(USE_CTL3D)" == "1" | |
99 | #Use WIN32S/WIN95 32 bit version ctl3d32.dll under win95 (Andre Beltman) | |
100 | PERIPH_LIBS=$(WXDIR)\lib\ctl3d32.lib $(PERIPH_LIBS) | |
101 | PERIPH_TARGET=ctl3d $(PERIPH_TARGET) | |
102 | PERIPH_CLEAN_TARGET=clean_ctl3d $(PERIPH_CLEAN_TARGET) | |
103 | !endif | |
104 | ||
105 | !if "$(USE_XPM_IN_MSW)" == "1" | |
106 | PERIPH_LIBS=$(WXLIB)\xpm.lib $(PERIPH_LIBS) | |
107 | PERIPH_TARGET=xpm $(PERIPH_TARGET) | |
108 | PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET) | |
109 | !endif | |
110 | ||
111 | #PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\jpeg.lib $(PERIPH_LIBS) | |
112 | PERIPH_LIBS= | |
113 | PERIPH_TARGET=zlib png jpeg $(PERIPH_TARGET) | |
114 | PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg $(PERIPH_CLEAN_TARGET) | |
115 | ||
116 | !if "$(DLL)" == "0" | |
117 | DUMMY=dummy | |
118 | !else | |
119 | DUMMY=dummydll | |
120 | LIBS= cw32 import32 ole2w32 | |
121 | !endif | |
122 | ||
123 | LIBTARGET=$(WXLIB) | |
124 | ||
125 | GENDIR=..\generic | |
126 | COMMDIR=..\common | |
127 | OLEDIR=.\ole | |
128 | MSWDIR=. | |
129 | ||
130 | DOCDIR = $(WXDIR)\docs | |
131 | ||
132 | GENERICOBJS= #$ ExpandList("WXGENERICOBJS"); | |
133 | ||
134 | # Not needed: | |
135 | # $(MSWDIR)\colrdlgg.obj \ | |
136 | # $(MSWDIR)\fontdlgg.obj \ | |
137 | # $(MSWDIR)\helpxlp.obj \ | |
138 | # $(MSWDIR)\msgdlgg.obj \ | |
139 | # $(MSWDIR)\printps.obj \ | |
140 | # $(MSWDIR)\prntdlgg.obj \ | |
141 | # $(MSWDIR)\listctrl.obj \ | |
142 | # $(MSWDIR)\notebook.obj \ | |
143 | # $(MSWDIR)\treectrl.obj | |
144 | ||
145 | COMMONOBJS = \ | |
146 | $(MSWDIR)\y_tab.obj \ | |
147 | #$ ExpandList("WXCOMMONOBJS"); | |
148 | ||
149 | MSWOBJS = #$ ExpandList("WXMSWOBJS"); | |
150 | ||
151 | OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) | |
152 | ||
153 | default: wx | |
154 | ||
155 | wx: $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) | |
156 | ||
157 | all: all_libs all_execs | |
158 | ||
159 | !if "$(DLL)" == "0" | |
160 | ||
161 | $(LIBTARGET): $(DUMMY).obj $(OBJECTS) | |
162 | -erase $(LIBTARGET) | |
163 | tlib $(LIBTARGET) /P1024 @&&! | |
164 | +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +) | |
165 | ! | |
166 | ||
167 | !else | |
168 | ||
169 | $(LIBTARGET): $(DUMMY).obj $(OBJECTS) | |
170 | -erase $(LIBTARGET) | |
171 | -erase $(WXLIBDIR)\wx.dll | |
172 | tlink32 $(LINK_FLAGS) /v @&&! | |
173 | c0d32.obj $(OBJECTS) | |
174 | $(WXLIBDIR)\wx | |
175 | nul | |
176 | $(PERIPH_LIBS) $(LIBS) | |
177 | wxb32 | |
178 | ! | |
179 | implib -c $(LIBTARGET) $(WXLIBDIR)\wx.dll | |
180 | ||
181 | !endif | |
182 | ||
183 | dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h | |
184 | dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h | |
185 | ||
186 | $(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c | |
187 | ||
188 | # cl @<< | |
189 | # $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@ | |
190 | # << | |
191 | ||
192 | $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c | |
193 | copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c | |
194 | ||
195 | $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c | |
196 | copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c | |
197 | ||
198 | # $(OBJECTS): $(WXDIR)\include\wx\setup.h | |
199 | ||
200 | #${ | |
201 | $_ = $project{"WXMSWOBJS"}; | |
202 | my @objs = split; | |
203 | foreach (@objs) { | |
204 | $text .= $_ . ": "; | |
205 | if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; } | |
206 | $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; | |
207 | s/obj$/$suffix/; | |
208 | $text .= $_ . "\n\n"; | |
209 | } | |
210 | #$} | |
211 | ||
212 | ######################################################## | |
213 | # Common objects (always compiled) | |
214 | ||
215 | #${ | |
216 | $_ = $project{"WXCOMMONOBJS"}; | |
217 | my @objs = split; | |
218 | foreach (@objs) { | |
219 | $text .= $_ . ": "; | |
220 | $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; | |
221 | s/MSWDIR/COMMDIR/; | |
222 | s/obj$/$suffix/; | |
223 | $text .= $_ . "\n\n"; | |
224 | } | |
225 | #$} | |
226 | ||
227 | ######################################################## | |
228 | # Generic objects (not always compiled, depending on | |
229 | # whether platforms have native implementations) | |
230 | ||
231 | #${ | |
232 | $_ = $project{"WXGENERICOBJS"}; | |
233 | my @objs = split; | |
234 | foreach (@objs) { | |
235 | $text .= $_ . ": "; | |
236 | s/MSWDIR/GENDIR/; | |
237 | s/obj$/\$(SRCSUFF)/; | |
238 | $text .= $_ . "\n\n"; | |
239 | } | |
240 | #$} | |
241 | ||
242 | ||
243 | all_utils: | |
244 | cd $(WXDIR)\utils | |
245 | make -f makefile.b32 | |
246 | cd $(WXDIR)\src\msw | |
247 | ||
248 | all_samples: | |
249 | cd $(WXDIR)\samples | |
250 | make -f makefile.b32 | |
251 | cd $(WXDIR)\src\msw | |
252 | ||
253 | all_execs: | |
254 | cd $(WXDIR)\utils | |
255 | make -f makefile.b32 all_execs | |
256 | cd $(WXDIR)\src\msw | |
257 | ||
258 | wxxpm: $(CFG) | |
259 | cd $(WXDIR)\src\xpm | |
260 | make -f makefile.b32 -DCFG=$(CFG) -DFINAL=$(FINAL) -DWXWIN=$(WXDIR) -DDEBUG=$(DEBUG) | |
261 | cd $(WXDIR)\src\msw | |
262 | ||
263 | clean_wxxpm: $(CFG) | |
264 | cd $(WXDIR)\src\xpm | |
265 | make -f makefile.b32 clean | |
266 | cd $(WXDIR)\src\msw | |
267 | ||
268 | png: $(CFG) | |
269 | cd $(WXDIR)\src\png | |
270 | make -f makefile.b32 | |
271 | cd $(WXDIR)\src\msw | |
272 | ||
273 | clean_png: | |
274 | cd $(WXDIR)\src\png | |
275 | make -f makefile.b32 clean | |
276 | cd $(WXDIR)\src\msw | |
277 | ||
278 | zlib: $(CFG) | |
279 | cd $(WXDIR)\src\zlib | |
280 | make -f makefile.b32 lib | |
281 | cd $(WXDIR)\src\msw | |
282 | ||
283 | clean_zlib: | |
284 | cd $(WXDIR)\src\zlib | |
285 | make -f makefile.b32 clean | |
286 | cd $(WXDIR)\src\msw | |
287 | ||
288 | jpeg: $(CFG) | |
289 | cd $(WXDIR)\src\jpeg | |
290 | make -f makefile.b32 | |
291 | cd $(WXDIR)\src\msw | |
292 | ||
293 | clean_jpeg: | |
294 | cd $(WXDIR)\src\jpeg | |
295 | make -f makefile.b32 clean | |
296 | cd $(WXDIR)\src\msw | |
297 | ||
298 | $(CFG): makefile.b32 | |
299 | copy &&! | |
300 | -H=$(WXDIR)\src\msw\wx32.csm | |
301 | -3 | |
302 | -d | |
303 | -R- | |
304 | -X | |
305 | -w-par | |
306 | -w-aus | |
307 | -w-hid # virtual function A hides virtual function B | |
308 | -WE | |
309 | -tWM | |
310 | ||
311 | -I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/xpm | |
312 | -I$(WXDIR)\include\wx\msw\gnuwin32 | |
313 | ||
314 | -L$(BCCDIR)\lib | |
315 | -D__WXWIN__ | |
316 | -D__WXMSW__ | |
317 | -D__WINDOWS__ | |
318 | -DWIN32 | |
319 | $(OPT) | |
320 | $(DEBUG_FLAGS) | |
321 | $(WIN95FLAG) | |
322 | ! $(CFG) | |
323 | ||
324 | #-I$(WXDIR)\src\common\wxxpm\libxpm.34b\lib | |
325 | # -Oxt | |
326 | ||
327 | clean: $(PERIPH_CLEAN_TARGET) | |
328 | -erase $(LIBTARGET) | |
329 | -erase *.obj | |
330 | -erase *.pch | |
331 | -erase *.csm | |
332 | -erase *.cfg | |
333 | -erase ..\common\y_tab.c | |
334 | -erase ..\common\lex_yy.c | |
335 | ||
336 | cleanall: clean | |
337 | ||
338 | ||
339 | MFTYPE=b32 | |
340 | # Can't use this or we'll have to distribute all tmake files with wxWindows | |
341 | # makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t | |
342 | ||
343 | self: | |
344 | cd $(WXWIN)\distrib\msw\tmake | |
345 | tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE) | |
346 | copy makefile.$(MFTYPE) $(WXWIN)\src\msw | |
347 |