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