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