]>
Commit | Line | Data |
---|---|---|
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 = "\$(OBJ_PATH)\\" . $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 = "\$(OBJ_PATH)\\" . $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"} .= "\$(OBJ_PATH)\\" . $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 regex $(PERIPH_TARGET) | |
89 | PERIPH_CLEAN_TARGET=clean_zlib 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 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 | #$ ExpandList("WXCOMMONOBJS"); | |
110 | ||
111 | MSWOBJS = #$ ExpandList("WXMSWOBJS"); | |
112 | ||
113 | OBJECTS = $(COMMONOBJS) $(MSWOBJS) | |
114 | ||
115 | default: wx | |
116 | ||
117 | wx: $(ARCHINCDIR)\wx makesetuph makearchsetuph makeoutdir $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) | |
118 | ||
119 | all: wx | |
120 | ||
121 | makeoutdir: | |
122 | -mkdir $(OBJ_PATH) | |
123 | ||
124 | # Copy the in-CVS setup0.h to setup.h if necessary | |
125 | makesetuph: | |
126 | cd $(WXDIR)\include\wx\msw | |
127 | if not exist setup.h copy setup0.h setup.h | |
128 | cd $(WXDIR)\src\msw | |
129 | ||
130 | # Copy include\wx\msw\setup.h to the architecture-specific location | |
131 | makearchsetuph: | |
132 | copy $(WXDIR)\include\wx\msw\setup.h $(ARCHSETUPH) | |
133 | cd $(WXDIR)\src\msw | |
134 | ||
135 | $(ARCHINCDIR)\wx: | |
136 | -mkdir $(ARCHINCDIR) | |
137 | -mkdir $(ARCHINCDIR)\wx | |
138 | -erase $(CFG) | |
139 | ||
140 | !if "$(DLL)" == "0" | |
141 | ||
142 | $(LIBTARGET): $(DUMMY).obj $(OBJECTS) | |
143 | -erase $(WXLIB) | |
144 | tlib "$(WXLIB)" /P1024 @&&! | |
145 | +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +) | |
146 | ! | |
147 | ||
148 | !else | |
149 | ||
150 | $(LIBTARGET): $(DUMMY).obj $(OBJECTS) | |
151 | -erase $(WXLIB) | |
152 | -erase $(WXDLL) | |
153 | $(LINK) $(LINK_FLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk /v @&&! | |
154 | c0d32.obj $(OBJECTS) | |
155 | $(WXLIBDIR)\$(WXLIBNAME) | |
156 | nul | |
157 | $(PERIPH_LIBS) $(LIBS) | |
158 | wxb32 | |
159 | ! | |
160 | implib -c $(LIBTARGET) $(WXLIBDIR)\$(WXLIBNAME).dll | |
161 | !endif | |
162 | ||
163 | dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h | |
164 | dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h version.res | |
165 | ||
166 | version.res: | |
167 | brc32 -r -i$(WXDIR)\include\ $(MSWDIR)\version.rc | |
168 | ||
169 | #${ | |
170 | $_ = $project{"WXMSWOBJS"}; | |
171 | my @objs = split; | |
172 | foreach (@objs) { | |
173 | $text .= $_ . ": "; | |
174 | $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; | |
175 | s/obj$/$suffix/; | |
176 | s/OBJ_PATH/MSWDIR/; | |
177 | if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; } | |
178 | ||
179 | $text .= $_ . "\n\n"; | |
180 | } | |
181 | #$} | |
182 | ||
183 | ######################################################## | |
184 | # Common objects (always compiled) | |
185 | ||
186 | #${ | |
187 | $_ = $project{"WXCOMMONOBJS"}; | |
188 | my @objs = split; | |
189 | foreach (@objs) { | |
190 | $text .= $_ . ": "; | |
191 | $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; | |
192 | s/OBJ_PATH/COMMDIR/; | |
193 | s/obj$/$suffix/; | |
194 | $text .= $_ . "\n\n"; | |
195 | } | |
196 | #$} | |
197 | ||
198 | ||
199 | all_utils: | |
200 | cd $(WXDIR)\utils | |
201 | ${MAKE} -f makefile.b32 | |
202 | cd $(WXDIR)\src\msw | |
203 | ||
204 | all_samples: | |
205 | cd $(WXDIR)\samples | |
206 | ${MAKE} -f makefile.b32 | |
207 | cd $(WXDIR)\src\msw | |
208 | ||
209 | all_execs: | |
210 | cd $(WXDIR)\utils | |
211 | ${MAKE} -f makefile.b32 all_execs | |
212 | cd $(WXDIR)\src\msw | |
213 | ||
214 | ||
215 | ||
216 | zlib: $(CFG) | |
217 | cd $(WXDIR)\src\zlib | |
218 | ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib | |
219 | cd $(WXDIR)\src\msw | |
220 | ||
221 | clean_zlib: | |
222 | cd $(WXDIR)\src\zlib | |
223 | ${MAKE} -f makefile.b32 clean | |
224 | cd $(WXDIR)\src\msw | |
225 | ||
226 | ||
227 | regex: $(CFG) | |
228 | cd $(WXDIR)\src\regex | |
229 | ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib | |
230 | cd $(WXDIR)\src\msw | |
231 | ||
232 | clean_regex: | |
233 | cd $(WXDIR)\src\regex | |
234 | ${MAKE} -f makefile.b32 clean | |
235 | cd $(WXDIR)\src\msw | |
236 | ||
237 | ||
238 | ||
239 | $(CFG): makebase.b32 | |
240 | copy &&! | |
241 | -Hc | |
242 | -H=$(WXDIR)\src\msw\wx32.csm | |
243 | -3 | |
244 | -d | |
245 | -a1 # byte alignment | |
246 | -R- | |
247 | -X | |
248 | -w-par | |
249 | -w-aus | |
250 | -w-hid # virtual function A hides virtual function B | |
251 | -tWM | |
252 | -tWC | |
253 | ||
254 | -I$(ARCHINCDIR);$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/tiff;$(THISDIR) | |
255 | -I$(WXDIR)\include\wx\msw\gnuwin32 | |
256 | ||
257 | -L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk | |
258 | -D__WXWIN__ | |
259 | -D__WXMSW__ | |
260 | -D__WINDOWS__ | |
261 | -DWIN32 | |
262 | $(OPT) | |
263 | $(DEBUG_FLAGS) | |
264 | $(WIN95FLAG) | |
265 | ! $(CFG) | |
266 | ||
267 | clean: $(PERIPH_CLEAN_TARGET) | |
268 | -$(RM) $(WXLIBDIR)\*.tds | |
269 | -$(RM) $(WXLIBDIR)\*.il? | |
270 | -$(RM) $(OBJ_PATH)\*.obj | |
271 | -$(RM) $(OBJ_PATH)\*.pch | |
272 | -$(RM) $(OBJ_PATH)\*.csm | |
273 | -$(RM) $(OBJ_PATH)\"wx32.#??" | |
274 | ||
275 | cleancfg: | |
276 | -$(RM) $(OBJ_PATH)\*.cfg | |
277 | ||
278 | ||
279 | cleanall: clean cleancfg | |
280 | ||
281 | ||
282 | self: | |
283 | cd $(WXWIN)\distrib\msw\tmake | |
284 | perl -S tmake -tb32base wxwin.pro -o makebase.b32 | |
285 | copy makebase.b32 $(WXWIN)\src\msw |