]>
Commit | Line | Data |
---|---|---|
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 | ||
74 | WXDIR = $(WXWIN) | |
75 | THISDIR = $(WXDIR)\src\msw | |
76 | ||
77 | # Set all these to 1 if you want to build a dynamic library | |
78 | !if "$(DLL)" == "1" | |
79 | WXMAKINGDLL=1 | |
80 | WXBUILDDLL=1 | |
81 | !endif | |
82 | ||
83 | wxUSE_GUI=0 | |
84 | ||
85 | !include $(WXDIR)\src\makeb32.env | |
86 | ||
87 | PERIPH_LIBS= | |
88 | PERIPH_TARGET=zlib png jpeg tiff regex $(PERIPH_TARGET) | |
89 | PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg clean_tiff clean_regex $(PERIPH_CLEAN_TARGET) | |
90 | ||
91 | !if "$(DLL)" == "0" | |
92 | DUMMY=dummy | |
93 | !else | |
94 | DUMMY=dummydll | |
95 | LIBS= cw32mti import32 ole2w32 odbc32 zlib winpng jpeg tiff regex | |
96 | !endif | |
97 | ||
98 | LIBTARGET=$(WXLIB) | |
99 | ||
100 | GENDIR=..\generic | |
101 | COMMDIR=..\common | |
102 | HTMLDIR=..\html | |
103 | OLEDIR=.\ole | |
104 | MSWDIR=. | |
105 | ||
106 | DOCDIR = $(WXDIR)\docs | |
107 | ||
108 | COMMONOBJS = \ | |
109 | $(MSWDIR)\y_tab.obj \ | |
110 | #$ ExpandList("WXCOMMONOBJS"); | |
111 | ||
112 | MSWOBJS = #$ ExpandList("WXMSWOBJS"); | |
113 | ||
114 | OBJECTS = $(COMMONOBJS) $(MSWOBJS) | |
115 | ||
116 | default: wx | |
117 | ||
118 | wx: $(ARCHINCDIR)\wx makesetuph makearchsetuph $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) | |
119 | ||
120 | all: wx | |
121 | ||
122 | # Copy the in-CVS setup0.h to setup.h if necessary | |
123 | makesetuph: | |
124 | cd $(WXDIR)\include\wx\msw | |
125 | if not exist setup.h copy setup0.h setup.h | |
126 | cd $(WXDIR)\src\msw | |
127 | ||
128 | # Copy include\wx\msw\setup.h to the architecture-specific location | |
129 | makearchsetuph: | |
130 | copy $(WXDIR)\include\wx\msw\setup.h $(ARCHSETUPH) | |
131 | cd $(WXDIR)\src\msw | |
132 | ||
133 | $(ARCHINCDIR)\wx: | |
134 | -mkdir $(ARCHINCDIR) | |
135 | -mkdir $(ARCHINCDIR)\wx | |
2dcd33c2 | 136 | -erase $(CFG) |
95f102ab CE |
137 | |
138 | !if "$(DLL)" == "0" | |
139 | ||
140 | $(LIBTARGET): $(DUMMY).obj $(OBJECTS) | |
141 | -erase $(WXLIB) | |
142 | tlib "$(WXLIB)" /P1024 @&&! | |
143 | +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +) | |
144 | ! | |
145 | ||
146 | !else | |
147 | ||
148 | $(LIBTARGET): $(DUMMY).obj $(OBJECTS) | |
149 | -erase $(WXLIB) | |
150 | -erase $(WXDLL) | |
151 | $(LINK) $(LINK_FLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk /v @&&! | |
152 | c0d32.obj $(OBJECTS) | |
153 | $(WXLIBDIR)\$(WXLIBNAME) | |
154 | nul | |
155 | $(PERIPH_LIBS) $(LIBS) | |
156 | wxb32 | |
157 | ! | |
158 | implib -c $(LIBTARGET) $(WXLIBDIR)\$(WXLIBNAME).dll | |
159 | !endif | |
160 | ||
161 | dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h | |
162 | dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h version.res | |
163 | ||
164 | version.res: | |
165 | brc32 -r -i$(WXDIR)\include\ $(MSWDIR)\version.rc | |
166 | ||
167 | $(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c | |
168 | ||
169 | # cl @<< | |
170 | # $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@ | |
171 | # << | |
172 | ||
173 | $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c | |
174 | copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c | |
175 | ||
176 | $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c | |
177 | copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c | |
178 | ||
179 | ||
180 | #${ | |
181 | $_ = $project{"WXMSWOBJS"}; | |
182 | my @objs = split; | |
183 | foreach (@objs) { | |
184 | $text .= $_ . ": "; | |
185 | if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; } | |
186 | $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; | |
187 | s/obj$/$suffix/; | |
188 | $text .= $_ . "\n\n"; | |
189 | } | |
190 | #$} | |
191 | ||
192 | ######################################################## | |
193 | # Common objects (always compiled) | |
194 | ||
195 | #${ | |
196 | $_ = $project{"WXCOMMONOBJS"}; | |
197 | my @objs = split; | |
198 | foreach (@objs) { | |
199 | $text .= $_ . ": "; | |
200 | $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; | |
201 | s/MSWDIR/COMMDIR/; | |
202 | s/obj$/$suffix/; | |
203 | $text .= $_ . "\n\n"; | |
204 | } | |
205 | #$} | |
206 | ||
207 | ||
208 | all_utils: | |
209 | cd $(WXDIR)\utils | |
210 | ${MAKE} -f makefile.b32 | |
211 | cd $(WXDIR)\src\msw | |
212 | ||
213 | all_samples: | |
214 | cd $(WXDIR)\samples | |
215 | ${MAKE} -f makefile.b32 | |
216 | cd $(WXDIR)\src\msw | |
217 | ||
218 | all_execs: | |
219 | cd $(WXDIR)\utils | |
220 | ${MAKE} -f makefile.b32 all_execs | |
221 | cd $(WXDIR)\src\msw | |
222 | ||
223 | png: $(CFG) | |
224 | cd $(WXDIR)\src\png | |
225 | ${MAKE} -f makefile.b32 wxUSE_GUI=0 | |
226 | cd $(WXDIR)\src\msw | |
227 | ||
228 | clean_png: | |
229 | cd $(WXDIR)\src\png | |
230 | ${MAKE} -f makefile.b32 clean | |
231 | cd $(WXDIR)\src\msw | |
232 | ||
233 | zlib: $(CFG) | |
234 | cd $(WXDIR)\src\zlib | |
235 | ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib | |
236 | cd $(WXDIR)\src\msw | |
237 | ||
238 | clean_zlib: | |
239 | cd $(WXDIR)\src\zlib | |
240 | ${MAKE} -f makefile.b32 clean | |
241 | cd $(WXDIR)\src\msw | |
242 | ||
243 | jpeg: $(CFG) | |
244 | cd $(WXDIR)\src\jpeg | |
245 | ${MAKE} -f makefile.b32 wxUSE_GUI=0 | |
246 | cd $(WXDIR)\src\msw | |
247 | ||
248 | clean_jpeg: | |
249 | cd $(WXDIR)\src\jpeg | |
250 | ${MAKE} -f makefile.b32 clean | |
251 | cd $(WXDIR)\src\msw | |
252 | ||
253 | regex: $(CFG) | |
254 | cd $(WXDIR)\src\regex | |
255 | ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib | |
256 | cd $(WXDIR)\src\msw | |
257 | ||
258 | clean_regex: | |
259 | cd $(WXDIR)\src\regex | |
260 | ${MAKE} -f makefile.b32 clean | |
261 | cd $(WXDIR)\src\msw | |
262 | ||
263 | tiff: $(CFG) | |
264 | cd $(WXDIR)\src\tiff | |
265 | ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib | |
266 | cd $(WXDIR)\src\msw | |
267 | ||
268 | clean_tiff: | |
269 | cd $(WXDIR)\src\tiff | |
270 | ${MAKE} -f makefile.b32 clean | |
271 | cd $(WXDIR)\src\msw | |
272 | ||
273 | $(CFG): makebase.b32 | |
274 | copy &&! | |
275 | -Hc | |
276 | -H=$(WXDIR)\src\msw\wx32.csm | |
277 | -3 | |
278 | -d | |
279 | -a1 # byte alignment | |
280 | -R- | |
281 | -X | |
282 | -w-par | |
283 | -w-aus | |
284 | -w-hid # virtual function A hides virtual function B | |
285 | -tWM | |
286 | -tWC | |
287 | ||
288 | -I$(ARCHINCDIR);$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/tiff;$(THISDIR) | |
289 | -I$(WXDIR)\include\wx\msw\gnuwin32 | |
290 | ||
291 | -L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk | |
292 | -D__WXWIN__ | |
293 | -D__WXMSW__ | |
294 | -D__WINDOWS__ | |
295 | -DWIN32 | |
296 | $(OPT) | |
297 | $(DEBUG_FLAGS) | |
298 | $(WIN95FLAG) | |
299 | ! $(CFG) | |
300 | ||
301 | clean: $(PERIPH_CLEAN_TARGET) | |
302 | -erase $(WXLIBDIR)\wx.tds | |
303 | -erase $(WXLIBDIR)\wx.il? | |
304 | -erase *.obj | |
305 | -erase *.pch | |
306 | -erase *.csm | |
307 | -erase "wx32.#??" | |
308 | -erase ..\common\y_tab.c | |
309 | -erase ..\common\lex_yy.c | |
310 | ||
311 | cleanall: clean | |
312 | ||
313 | self: | |
314 | cd $(WXWIN)\distrib\msw\tmake | |
315 | tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE) | |
316 | copy makefile.$(MFTYPE) $(WXWIN)\src\msw |