]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/tmake/b32.t
fixed (didn't work at all)
[wxWidgets.git] / distrib / msw / tmake / b32.t
CommitLineData
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 = "";
8ed88978 18 next if $wxGeneric{$file} =~ /\b(PS|G|16|U)\b/;
f2071dda
VZ
19
20 $file =~ s/cp?p?$/obj/;
21 $project{"WXGENERICOBJS"} .= "\$(MSWDIR)\\" . $file . " "
22 }
23
24 foreach $file (sort keys %wxCommon) {
9f3553c8 25 $isCFile = $file =~ /\.c$/;
f2071dda 26 $file =~ s/cp?p?$/obj/;
9f3553c8
VZ
27 $obj = "\$(MSWDIR)\\" . $file . " ";
28 $project{"WXCOMMONOBJS"} .= $obj;
29 $project{"WXCOBJS"} .= $obj if $isCFile;
f2071dda
VZ
30 }
31
32 foreach $file (sort keys %wxMSW) {
33 next if $wxMSW{$file} =~ /\b16\b/;
34
d9d61c23 35 if ( $file =~ /^automtn/ ) {
f2071dda
VZ
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
6e29a95a 41 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
f2071dda 42 $file =~ s/cp?p?$/obj/;
6e29a95a
VZ
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
f2071dda
VZ
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
77WXDIR = $(WXWIN)
78
79# Set all these to 1 if you want to build a dynamic library
80!if "$(DLL)" == "1"
81WXMAKINGDLL=1
82WXBUILDDLL=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
89USE_CTL3D=0
90USE_XPM_IN_MSW=0
91
92PERIPH_LIBS=
93PERIPH_TARGET=
94PERIPH_CLEAN_TARGET=
95
96!if "$(USE_CTL3D)" == "1"
97#Use WIN32S/WIN95 32 bit version ctl3d32.dll under win95 (Andre Beltman)
98PERIPH_LIBS=$(WXDIR)\lib\ctl3d32.lib $(PERIPH_LIBS)
99PERIPH_TARGET=ctl3d $(PERIPH_TARGET)
100PERIPH_CLEAN_TARGET=clean_ctl3d $(PERIPH_CLEAN_TARGET)
101!endif
102
103!if "$(USE_XPM_IN_MSW)" == "1"
104PERIPH_LIBS=$(WXLIB)\xpm.lib $(PERIPH_LIBS)
105PERIPH_TARGET=xpm $(PERIPH_TARGET)
106PERIPH_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)
110PERIPH_LIBS=
111PERIPH_TARGET=zlib png jpeg $(PERIPH_TARGET)
112PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg $(PERIPH_CLEAN_TARGET)
113
114!if "$(DLL)" == "0"
115DUMMY=dummy
116!else
117DUMMY=dummydll
118LIBS= cw32 import32 ole2w32
119!endif
120
121LIBTARGET=$(WXLIB)
122
123GENDIR=..\generic
124COMMDIR=..\common
125OLEDIR=.\ole
126MSWDIR=.
127
128DOCDIR = $(WXDIR)\docs
129
130GENERICOBJS= #$ 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
143COMMONOBJS = \
144 $(MSWDIR)\y_tab.obj \
145 #$ ExpandList("WXCOMMONOBJS");
146
147MSWOBJS = #$ ExpandList("WXMSWOBJS");
148
149OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
150
151default: wx
152
153wx: $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
154
155all: all_libs all_execs
156
157!if "$(DLL)" == "0"
158
159$(LIBTARGET): $(DUMMY).obj $(OBJECTS)
160 -erase $(LIBTARGET)
e5b767ff 161 tlib $(LIBTARGET) /P1024 @&&!
f2071dda
VZ
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 @&&!
171c0d32.obj $(OBJECTS)
172$(WXLIBDIR)\wx
173nul
174$(PERIPH_LIBS) $(LIBS)
175wxb32
176!
177 implib -c $(LIBTARGET) $(WXLIBDIR)\wx.dll
178
179!endif
180
181dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
182dummydll.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 .= $_ . ": ";
6e29a95a 203 if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; }
f2071dda
VZ
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 .= $_ . ": ";
9f3553c8 217 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
f2071dda 218 s/MSWDIR/COMMDIR/;
9f3553c8 219 s/obj$/$suffix/;
f2071dda
VZ
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
240all_utils:
241 cd $(WXDIR)\utils
242 make -f makefile.b32
243 cd $(WXDIR)\src\msw
244
245all_samples:
246 cd $(WXDIR)\samples
247 make -f makefile.b32
248 cd $(WXDIR)\src\msw
249
250all_execs:
251 cd $(WXDIR)\utils
252 make -f makefile.b32 all_execs
253 cd $(WXDIR)\src\msw
254
255wxxpm: $(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
260clean_wxxpm: $(CFG)
261 cd $(WXDIR)\src\xpm
262 make -f makefile.b32 clean
263 cd $(WXDIR)\src\msw
264
265png: $(CFG)
266 cd $(WXDIR)\src\png
9be9b974 267 make -f makefile.b32
f2071dda
VZ
268 cd $(WXDIR)\src\msw
269
270clean_png:
271 cd $(WXDIR)\src\png
272 make -f makefile.b32 clean
273 cd $(WXDIR)\src\msw
274
275zlib: $(CFG)
276 cd $(WXDIR)\src\zlib
277 make -f makefile.b32 lib
278 cd $(WXDIR)\src\msw
279
280clean_zlib:
281 cd $(WXDIR)\src\zlib
282 make -f makefile.b32 clean
283 cd $(WXDIR)\src\msw
284
285jpeg: $(CFG)
286 cd $(WXDIR)\src\jpeg
9be9b974 287 make -f makefile.b32
f2071dda
VZ
288 cd $(WXDIR)\src\msw
289
290clean_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
324clean: $(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
333cleanall: clean
334
335
9be9b974
RD
336MFTYPE=b32
337makefile.$(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