]>
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 | |
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 @&&! | |
151 | c0d32.obj $(OBJECTS) | |
152 | $(WXLIBDIR)\$(WXLIBNAME) | |
153 | nul | |
154 | $(PERIPH_LIBS) $(LIBS) | |
155 | wxb32 | |
156 | ! | |
157 | implib -c $(LIBTARGET) $(WXLIBDIR)\$(WXLIBNAME).dll | |
158 | !endif | |
159 | ||
160 | dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h | |
161 | dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h version.res | |
162 | ||
163 | version.res: | |
164 | brc32 -r -i$(WXDIR)\include\ $(MSWDIR)\version.rc | |
165 | ||
166 | $(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c | |
167 | ||
168 | # cl @<< | |
169 | # $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@ | |
170 | # << | |
171 | ||
172 | $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c | |
173 | copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c | |
174 | ||
175 | $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c | |
176 | copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c | |
177 | ||
178 | ||
179 | #${ | |
180 | $_ = $project{"WXMSWOBJS"}; | |
181 | my @objs = split; | |
182 | foreach (@objs) { | |
183 | $text .= $_ . ": "; | |
184 | if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; } | |
185 | $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; | |
186 | s/obj$/$suffix/; | |
187 | $text .= $_ . "\n\n"; | |
188 | } | |
189 | #$} | |
190 | ||
191 | ######################################################## | |
192 | # Common objects (always compiled) | |
193 | ||
194 | #${ | |
195 | $_ = $project{"WXCOMMONOBJS"}; | |
196 | my @objs = split; | |
197 | foreach (@objs) { | |
198 | $text .= $_ . ": "; | |
199 | $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; | |
200 | s/MSWDIR/COMMDIR/; | |
201 | s/obj$/$suffix/; | |
202 | $text .= $_ . "\n\n"; | |
203 | } | |
204 | #$} | |
205 | ||
206 | ||
207 | all_utils: | |
208 | cd $(WXDIR)\utils | |
209 | ${MAKE} -f makefile.b32 | |
210 | cd $(WXDIR)\src\msw | |
211 | ||
212 | all_samples: | |
213 | cd $(WXDIR)\samples | |
214 | ${MAKE} -f makefile.b32 | |
215 | cd $(WXDIR)\src\msw | |
216 | ||
217 | all_execs: | |
218 | cd $(WXDIR)\utils | |
219 | ${MAKE} -f makefile.b32 all_execs | |
220 | cd $(WXDIR)\src\msw | |
221 | ||
222 | png: $(CFG) | |
223 | cd $(WXDIR)\src\png | |
224 | ${MAKE} -f makefile.b32 wxUSE_GUI=0 | |
225 | cd $(WXDIR)\src\msw | |
226 | ||
227 | clean_png: | |
228 | cd $(WXDIR)\src\png | |
229 | ${MAKE} -f makefile.b32 clean | |
230 | cd $(WXDIR)\src\msw | |
231 | ||
232 | zlib: $(CFG) | |
233 | cd $(WXDIR)\src\zlib | |
234 | ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib | |
235 | cd $(WXDIR)\src\msw | |
236 | ||
237 | clean_zlib: | |
238 | cd $(WXDIR)\src\zlib | |
239 | ${MAKE} -f makefile.b32 clean | |
240 | cd $(WXDIR)\src\msw | |
241 | ||
242 | jpeg: $(CFG) | |
243 | cd $(WXDIR)\src\jpeg | |
244 | ${MAKE} -f makefile.b32 wxUSE_GUI=0 | |
245 | cd $(WXDIR)\src\msw | |
246 | ||
247 | clean_jpeg: | |
248 | cd $(WXDIR)\src\jpeg | |
249 | ${MAKE} -f makefile.b32 clean | |
250 | cd $(WXDIR)\src\msw | |
251 | ||
252 | regex: $(CFG) | |
253 | cd $(WXDIR)\src\regex | |
254 | ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib | |
255 | cd $(WXDIR)\src\msw | |
256 | ||
257 | clean_regex: | |
258 | cd $(WXDIR)\src\regex | |
259 | ${MAKE} -f makefile.b32 clean | |
260 | cd $(WXDIR)\src\msw | |
261 | ||
262 | tiff: $(CFG) | |
263 | cd $(WXDIR)\src\tiff | |
264 | ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib | |
265 | cd $(WXDIR)\src\msw | |
266 | ||
267 | clean_tiff: | |
268 | cd $(WXDIR)\src\tiff | |
269 | ${MAKE} -f makefile.b32 clean | |
270 | cd $(WXDIR)\src\msw | |
271 | ||
272 | $(CFG): makebase.b32 | |
273 | copy &&! | |
274 | -Hc | |
275 | -H=$(WXDIR)\src\msw\wx32.csm | |
276 | -3 | |
277 | -d | |
278 | -a1 # byte alignment | |
279 | -R- | |
280 | -X | |
281 | -w-par | |
282 | -w-aus | |
283 | -w-hid # virtual function A hides virtual function B | |
284 | -tWM | |
285 | -tWC | |
286 | ||
287 | -I$(ARCHINCDIR);$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/tiff;$(THISDIR) | |
288 | -I$(WXDIR)\include\wx\msw\gnuwin32 | |
289 | ||
290 | -L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk | |
291 | -D__WXWIN__ | |
292 | -D__WXMSW__ | |
293 | -D__WINDOWS__ | |
294 | -DWIN32 | |
295 | $(OPT) | |
296 | $(DEBUG_FLAGS) | |
297 | $(WIN95FLAG) | |
298 | ! $(CFG) | |
299 | ||
300 | clean: $(PERIPH_CLEAN_TARGET) | |
301 | -erase $(WXLIBDIR)\wx.tds | |
302 | -erase $(WXLIBDIR)\wx.il? | |
303 | -erase *.obj | |
304 | -erase *.pch | |
305 | -erase *.csm | |
306 | -erase "wx32.#??" | |
307 | -erase ..\common\y_tab.c | |
308 | -erase ..\common\lex_yy.c | |
309 | ||
310 | cleanall: clean | |
311 | ||
312 | self: | |
313 | cd $(WXWIN)\distrib\msw\tmake | |
314 | tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE) | |
315 | copy makefile.$(MFTYPE) $(WXWIN)\src\msw |