]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/tmake/b32base.t
wxMac does need radiocmn
[wxWidgets.git] / distrib / msw / tmake / b32base.t
CommitLineData
95f102ab
CE
1#!#############################################################################
2#! File: baseb32.t
3#! Purpose: tmake template file from which makebase.b32 is generated by running
4#! tmake -t b32 wxwin.pro
5#! Author: Michael Fielding
6#! Created: 6-08-02
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 %wxCommon) {
17 next if $wxCommon{$file} !~ /\bB\b/;
18
19 $isCFile = $file =~ /\.c$/;
20 $file =~ s/cp?p?$/obj/;
21 $obj = "\$(MSWDIR)\\" . $file . " ";
22 $project{"WXCOMMONOBJS"} .= $obj;
23 $project{"WXCOBJS"} .= $obj if $isCFile;
24 }
25
26 foreach $file (sort keys %wxMSW) {
27 next if $wxMSW{$file} !~ /\bB\b/;
28
29 $isCFile = $file =~ /\.c$/;
30
31 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
32 $file =~ s/cp?p?$/obj/;
33 my $obj = "\$(MSWDIR)\\" . $file . " ";
34
35 $project{"WXMSWOBJS"} .= $obj;
36 if ( $isOleObj ) {
37 #! remember that this file is in ole subdir
38 $project{"WXOLEOBJS"} .= $obj;
39 }
40 $project{"WXCOBJS"} .= $obj if $isCFile;
41 }
42
43 foreach $file (sort keys %wxBase) {
44 $isCFile = $file =~ /\.c$/;
45 $file =~ s/cp?p?$/obj/;
46 $project{"WXCOMMONOBJS"} .= "\$(MSWDIR)\\" . $file . " ";
47 $project{"WXCOBJS"} .= $obj if $isCFile;
48 }
49#$}
50
51
52
53# This file was automatically generated by tmake
54# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
55
56#
57# File: makebase.b32
58# Author: Julian Smart
59# Created: 1998
60# Updated: Michael Fielding, 2002
61# Copyright:
62#
63# "%W% %G%"
64#
65# Makefile : Builds wxWindows library wxbase.lib for MS Windows,
66# and Borland C++ (32-bit).
67
68# BCCDIR now defined in ../makeb32.env
69
70!if "$(WXWIN)" == ""
71!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
72!endif
73
74WXDIR = $(WXWIN)
75THISDIR = $(WXDIR)\src\msw
76
77# Set all these to 1 if you want to build a dynamic library
78!if "$(DLL)" == "1"
79WXMAKINGDLL=1
80WXBUILDDLL=1
81!endif
82
83wxUSE_GUI=0
84
85!include $(WXDIR)\src\makeb32.env
86
87PERIPH_LIBS=
2b5f62a0
VZ
88PERIPH_TARGET=zlib regex $(PERIPH_TARGET)
89PERIPH_CLEAN_TARGET=clean_zlib clean_regex $(PERIPH_CLEAN_TARGET)
95f102ab
CE
90
91!if "$(DLL)" == "0"
92DUMMY=dummy
93!else
94DUMMY=dummydll
95LIBS= cw32mti import32 ole2w32 odbc32 zlib winpng jpeg tiff regex
96!endif
97
98LIBTARGET=$(WXLIB)
99
100GENDIR=..\generic
101COMMDIR=..\common
102HTMLDIR=..\html
103OLEDIR=.\ole
104MSWDIR=.
105
106DOCDIR = $(WXDIR)\docs
107
108COMMONOBJS = \
95f102ab
CE
109 #$ ExpandList("WXCOMMONOBJS");
110
111MSWOBJS = #$ ExpandList("WXMSWOBJS");
112
113OBJECTS = $(COMMONOBJS) $(MSWOBJS)
114
115default: wx
116
117wx: $(ARCHINCDIR)\wx makesetuph makearchsetuph $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
118
119all: wx
120
121# Copy the in-CVS setup0.h to setup.h if necessary
122makesetuph:
123 cd $(WXDIR)\include\wx\msw
124 if not exist setup.h copy setup0.h setup.h
125 cd $(WXDIR)\src\msw
126
127# Copy include\wx\msw\setup.h to the architecture-specific location
128makearchsetuph:
129 copy $(WXDIR)\include\wx\msw\setup.h $(ARCHSETUPH)
130 cd $(WXDIR)\src\msw
131
132$(ARCHINCDIR)\wx:
133 -mkdir $(ARCHINCDIR)
134 -mkdir $(ARCHINCDIR)\wx
2dcd33c2 135 -erase $(CFG)
95f102ab
CE
136
137!if "$(DLL)" == "0"
138
139$(LIBTARGET): $(DUMMY).obj $(OBJECTS)
140 -erase $(WXLIB)
141 tlib "$(WXLIB)" /P1024 @&&!
142+$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
143!
144
145!else
146
147$(LIBTARGET): $(DUMMY).obj $(OBJECTS)
148 -erase $(WXLIB)
149 -erase $(WXDLL)
150 $(LINK) $(LINK_FLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk /v @&&!
151c0d32.obj $(OBJECTS)
152$(WXLIBDIR)\$(WXLIBNAME)
153nul
154$(PERIPH_LIBS) $(LIBS)
155wxb32
156!
157 implib -c $(LIBTARGET) $(WXLIBDIR)\$(WXLIBNAME).dll
158!endif
159
160dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
161dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h version.res
162
163version.res:
164 brc32 -r -i$(WXDIR)\include\ $(MSWDIR)\version.rc
165
95f102ab
CE
166#${
167 $_ = $project{"WXMSWOBJS"};
168 my @objs = split;
169 foreach (@objs) {
170 $text .= $_ . ": ";
171 if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; }
172 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
173 s/obj$/$suffix/;
174 $text .= $_ . "\n\n";
175 }
176#$}
177
178########################################################
179# Common objects (always compiled)
180
181#${
182 $_ = $project{"WXCOMMONOBJS"};
183 my @objs = split;
184 foreach (@objs) {
185 $text .= $_ . ": ";
186 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
187 s/MSWDIR/COMMDIR/;
188 s/obj$/$suffix/;
189 $text .= $_ . "\n\n";
190 }
191#$}
192
193
194all_utils:
195 cd $(WXDIR)\utils
196 ${MAKE} -f makefile.b32
197 cd $(WXDIR)\src\msw
198
199all_samples:
200 cd $(WXDIR)\samples
201 ${MAKE} -f makefile.b32
202 cd $(WXDIR)\src\msw
203
204all_execs:
205 cd $(WXDIR)\utils
206 ${MAKE} -f makefile.b32 all_execs
207 cd $(WXDIR)\src\msw
208
209png: $(CFG)
210 cd $(WXDIR)\src\png
211 ${MAKE} -f makefile.b32 wxUSE_GUI=0
212 cd $(WXDIR)\src\msw
213
214clean_png:
215 cd $(WXDIR)\src\png
216 ${MAKE} -f makefile.b32 clean
217 cd $(WXDIR)\src\msw
218
219zlib: $(CFG)
220 cd $(WXDIR)\src\zlib
221 ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib
222 cd $(WXDIR)\src\msw
223
224clean_zlib:
225 cd $(WXDIR)\src\zlib
226 ${MAKE} -f makefile.b32 clean
227 cd $(WXDIR)\src\msw
228
229jpeg: $(CFG)
230 cd $(WXDIR)\src\jpeg
231 ${MAKE} -f makefile.b32 wxUSE_GUI=0
232 cd $(WXDIR)\src\msw
233
234clean_jpeg:
235 cd $(WXDIR)\src\jpeg
236 ${MAKE} -f makefile.b32 clean
237 cd $(WXDIR)\src\msw
238
239regex: $(CFG)
240 cd $(WXDIR)\src\regex
241 ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib
242 cd $(WXDIR)\src\msw
243
244clean_regex:
245 cd $(WXDIR)\src\regex
246 ${MAKE} -f makefile.b32 clean
247 cd $(WXDIR)\src\msw
248
249tiff: $(CFG)
250 cd $(WXDIR)\src\tiff
251 ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib
252 cd $(WXDIR)\src\msw
253
254clean_tiff:
255 cd $(WXDIR)\src\tiff
256 ${MAKE} -f makefile.b32 clean
257 cd $(WXDIR)\src\msw
258
259$(CFG): makebase.b32
260 copy &&!
261-Hc
262-H=$(WXDIR)\src\msw\wx32.csm
263-3
264-d
265-a1 # byte alignment
266-R-
267-X
268-w-par
269-w-aus
270-w-hid # virtual function A hides virtual function B
271-tWM
272-tWC
273
274-I$(ARCHINCDIR);$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/tiff;$(THISDIR)
275-I$(WXDIR)\include\wx\msw\gnuwin32
276
277-L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk
278-D__WXWIN__
279-D__WXMSW__
280-D__WINDOWS__
281-DWIN32
282$(OPT)
283$(DEBUG_FLAGS)
284$(WIN95FLAG)
285! $(CFG)
286
287clean: $(PERIPH_CLEAN_TARGET)
288 -erase $(WXLIBDIR)\wx.tds
289 -erase $(WXLIBDIR)\wx.il?
290 -erase *.obj
291 -erase *.pch
292 -erase *.csm
293 -erase "wx32.#??"
95f102ab
CE
294
295cleanall: clean
296
297self:
298 cd $(WXWIN)\distrib\msw\tmake
299 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
300 copy makefile.$(MFTYPE) $(WXWIN)\src\msw