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