]>
Commit | Line | Data |
---|---|---|
1 | #!############################################################################# | |
2 | #! File: wat.t | |
3 | #! Purpose: tmake template file from which makefile.wat is generated by running | |
4 | #! tmake -t wat wxwin.pro -o makefile.wat | |
5 | #! TODO: | |
6 | #! - extended.c, unzip.c must be compiled with $(CC), not $(CCC). | |
7 | #! - extended.c, unzip.c targets must be as per b32.t etc. | |
8 | #! - OLE files not generated correctly (need 'ole/' directory) | |
9 | #! Author: Vadim Zeitlin | |
10 | #! Created: 14.07.99 | |
11 | #! Version: $Id$ | |
12 | #!############################################################################# | |
13 | #${ | |
14 | #! include the code which parses filelist.txt file and initializes | |
15 | #! %wxCommon, %wxGeneric and %wxMSW hashes. | |
16 | IncludeTemplate("filelist.t"); | |
17 | ||
18 | #! now transform these hashes into $project tags | |
19 | foreach $file (sort keys %wxGeneric) { | |
20 | my $tag = ""; | |
21 | if ( $wxGeneric{$file} =~ /\b(PS|G|16|U)\b/ ) { | |
22 | $tag = "WXNONESSENTIALOBJS"; | |
23 | } | |
24 | else { | |
25 | $tag = "WXGENERICOBJS"; | |
26 | } | |
27 | ||
28 | $file =~ s/cp?p?$/obj/; | |
29 | $project{$tag} .= $file . " " | |
30 | } | |
31 | ||
32 | foreach $file (sort keys %wxCommon) { | |
33 | #! doesn't compile, apparently | |
34 | next if $file =~ /^imagjpeg\./; | |
35 | ||
36 | $isCFile = $file =~ /\.c$/; | |
37 | $file =~ s/cp?p?$/obj/; | |
38 | $project{"WXCOMMONOBJS"} .= $file . " "; | |
39 | $project{"WXCOBJS"} .= $file . " " if $isCFile; | |
40 | } | |
41 | ||
42 | foreach $file (sort keys %wxMSW) { | |
43 | #! these files don't compile | |
44 | next if $file =~ /^pnghand\./; | |
45 | ||
46 | #! next if $wxGeneric{$file} =~ /\b16\b/; | |
47 | ||
48 | my $isOleObj = $wxMSW{$file} =~ /\bO\b/; | |
49 | my $isCFile = $file =~ /\.c$/; | |
50 | $file =~ s/cp?p?$/obj/; | |
51 | $project{"WXMSWOBJS"} .= $file . " "; | |
52 | $project{"WXCOBJS"} .= $file . " " if $isCFile; | |
53 | $project{"WXOLEOBJS"} .= $file . " " if $isOleObj | |
54 | } | |
55 | #$} | |
56 | #! an attempt to embed '#' directly in the string somehow didn't work... | |
57 | #$ $text = chr(35) . '!/binb/wmake.exe'; | |
58 | ||
59 | # This file was automatically generated by tmake at #$ Now() | |
60 | # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T! | |
61 | ||
62 | # | |
63 | # File: makefile.wat | |
64 | # Author: Julian Smart | |
65 | # Created: 1998 | |
66 | # | |
67 | # Makefile : Builds wxWindows library for Watcom C++, WIN32 | |
68 | # | |
69 | # NOTE: This file is generated from wat.t by tmake, but not all bugs have | |
70 | # been removed from this process. If wxWindows doesn't compile, | |
71 | # check the following and edit this makefile accordingly: | |
72 | # | |
73 | # - OLE-related files such as oleutils.cpp should have 'ole\' prepended | |
74 | # to the path. | |
75 | # - extended.c, gsocket.c, unzip.c must be compiled using $(CC), not $(CCC). | |
76 | # They may also be wrongly specified as extended.cpp, etc. | |
77 | ||
78 | WXDIR = ..\.. | |
79 | ||
80 | !include $(WXDIR)\src\makewat.env | |
81 | ||
82 | WXLIB = $(WXDIR)\lib | |
83 | ||
84 | LIBTARGET = $(WXLIB)\wx.lib | |
85 | DUMMY=dummydll | |
86 | # ODBCLIB = ..\..\contrib\odbc\odbc32.lib | |
87 | ||
88 | EXTRATARGETS = xpm png zlib | |
89 | EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib | |
90 | GENDIR=$(WXDIR)\src\generic | |
91 | COMMDIR=$(WXDIR)\src\common | |
92 | XPMDIR=$(WXDIR)\src\xpm | |
93 | MSWDIR=$(WXDIR)\src\msw | |
94 | OLEDIR=$(MSWDIR)\ole | |
95 | ||
96 | DOCDIR = $(WXDIR)\docs | |
97 | ||
98 | GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "", " &\n\t") | |
99 | ||
100 | # These are generic things that don't need to be compiled on MSW, | |
101 | # but sometimes it's useful to do so for testing purposes. | |
102 | NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "", " &\n\t") | |
103 | ||
104 | COMMONOBJS = & | |
105 | y_tab.obj & | |
106 | #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t") | |
107 | ||
108 | MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t") | |
109 | ||
110 | # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc. | |
111 | OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) | |
112 | ||
113 | all: $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) | |
114 | ||
115 | $(LIBTARGET) : $(OBJECTS) | |
116 | %create tmp.lbc | |
117 | @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i | |
118 | wlib /b /c /n /p=512 $^@ @tmp.lbc | |
119 | ||
120 | #test : $(OBJECTS) | |
121 | # %create tmp.lbc | |
122 | # @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i | |
123 | # wlib /b /c /n /p=512 $^@ @tmp.lbc | |
124 | ||
125 | ||
126 | clean: .SYMBOLIC $(EXTRATARGETSCLEAN) | |
127 | -erase *.obj | |
128 | -erase $(LIBTARGET) | |
129 | -erase *.pch | |
130 | -erase *.err | |
131 | -erase *.lbc | |
132 | ||
133 | cleanall: clean | |
134 | ||
135 | #${ | |
136 | $_ = $project{"WXMSWOBJS"}; | |
137 | my @objs = split; | |
138 | foreach (@objs) { | |
139 | $text .= $_ . ': $('; | |
140 | s/\.obj$//; | |
141 | if ( $project{"WXOLEOBJS"} =~ /\b\Q$_\E\b/ ) { | |
142 | $text .= 'OLEDIR)\\'; | |
143 | } else { | |
144 | $text .= 'MSWDIR)\\'; | |
145 | } | |
146 | my $suffix, $cc; | |
147 | if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) { | |
148 | $suffix = "c"; | |
149 | $cc="CC"; | |
150 | } | |
151 | else { | |
152 | $suffix = "cpp"; | |
153 | $cc="CCC"; | |
154 | } | |
155 | $text .= $_ . ".$suffix\n" . | |
156 | " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n"; | |
157 | } | |
158 | #$} | |
159 | ||
160 | ######################################################## | |
161 | # Common objects (always compiled) | |
162 | ||
163 | #${ | |
164 | $_ = $project{"WXCOMMONOBJS"}; | |
165 | my @objs = split; | |
166 | foreach (@objs) { | |
167 | $text .= $_; | |
168 | s/\.obj$//; | |
169 | $text .= ': $(COMMDIR)\\'; | |
170 | my $suffix, $cc; | |
171 | if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) { | |
172 | $suffix = "c"; | |
173 | $cc="CC"; | |
174 | } | |
175 | else { | |
176 | $suffix = "cpp"; | |
177 | $cc="CCC"; | |
178 | } | |
179 | $text .= $_ . ".$suffix\n" . | |
180 | " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n"; | |
181 | } | |
182 | #$} | |
183 | ||
184 | y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c | |
185 | *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c | |
186 | ||
187 | # *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c | |
188 | ||
189 | $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c | |
190 | copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c | |
191 | ||
192 | $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c | |
193 | copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c | |
194 | ||
195 | ######################################################## | |
196 | # Generic objects (not always compiled, depending on | |
197 | # whether platforms have native implementations) | |
198 | ||
199 | #${ | |
200 | $_ = $project{"WXGENERICOBJS"}; | |
201 | my @objs = split; | |
202 | foreach (@objs) { | |
203 | $text .= $_; | |
204 | s/\.obj$//; | |
205 | $text .= ': $(GENDIR)\\'; | |
206 | $text .= $_ . ".cpp\n" . | |
207 | ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n"; | |
208 | } | |
209 | #$} | |
210 | ||
211 | crbuffri.obj: $(XPMDIR)\crbuffri.c | |
212 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
213 | ||
214 | crbuffrp.obj: $(XPMDIR)\crbuffrp.c | |
215 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
216 | ||
217 | crdatfri.obj: $(XPMDIR)\crdatfri.c | |
218 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
219 | ||
220 | crdatfrp.obj: $(XPMDIR)\crdatfrp.c | |
221 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
222 | ||
223 | create.obj: $(XPMDIR)\create.c | |
224 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
225 | ||
226 | crifrbuf.obj: $(XPMDIR)\crifrbuf.c | |
227 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
228 | ||
229 | crifrdat.obj: $(XPMDIR)\crifrdat.c | |
230 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
231 | ||
232 | crpfrbuf.obj: $(XPMDIR)\crpfrbuf.c | |
233 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
234 | ||
235 | crpfrdat.obj: $(XPMDIR)\crpfrdat.c | |
236 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
237 | ||
238 | # TODO: what to do about this clash of filename???? | |
239 | #data.obj: $(XPMDIR)\data.c | |
240 | # *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
241 | ||
242 | hashtab.obj: $(XPMDIR)\hashtab.c | |
243 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
244 | ||
245 | misc.obj: $(XPMDIR)\misc.c | |
246 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
247 | ||
248 | parse.obj: $(XPMDIR)\parse.c | |
249 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
250 | ||
251 | rdftodat.obj: $(XPMDIR)\rdftodat.c | |
252 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
253 | ||
254 | rdftoi.obj: $(XPMDIR)\rdftoi.c | |
255 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
256 | ||
257 | rdftop.obj: $(XPMDIR)\rdftop.c | |
258 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
259 | ||
260 | rgb.obj: $(XPMDIR)\rgb.c | |
261 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
262 | ||
263 | scan.obj: $(XPMDIR)\scan.c | |
264 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
265 | ||
266 | simx.obj: $(XPMDIR)\simx.c | |
267 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
268 | ||
269 | wrffrdat.obj: $(XPMDIR)\wrffrdat.c | |
270 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
271 | ||
272 | wrffri.obj: $(XPMDIR)\wrffri.c | |
273 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
274 | ||
275 | wrffrp.obj: $(XPMDIR)\wrffrp.c | |
276 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
277 | ||
278 | OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \ | |
279 | trees$(O) | |
280 | OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \ | |
281 | infutil$(O) inffast$(O) | |
282 | ||
283 | adler32.obj: adler32.c zutil.h zlib.h zconf.h | |
284 | $(CC) -c $(CFLAGS) $*.c | |
285 | ||
286 | compress.obj: compress.c zlib.h zconf.h | |
287 | $(CC) -c $(CFLAGS) $*.c | |
288 | ||
289 | crc32.obj: crc32.c zutil.h zlib.h zconf.h | |
290 | $(CC) -c $(CFLAGS) $*.c | |
291 | ||
292 | deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h | |
293 | $(CC) -c $(CFLAGS) $*.c | |
294 | ||
295 | gzio.obj: gzio.c zutil.h zlib.h zconf.h | |
296 | $(CC) -c $(CFLAGS) $*.c | |
297 | ||
298 | infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\ | |
299 | infcodes.h infutil.h | |
300 | $(CC) -c $(CFLAGS) $*.c | |
301 | ||
302 | infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\ | |
303 | infcodes.h inffast.h | |
304 | $(CC) -c $(CFLAGS) $*.c | |
305 | ||
306 | inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h | |
307 | $(CC) -c $(CFLAGS) $*.c | |
308 | ||
309 | inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h | |
310 | $(CC) -c $(CFLAGS) $*.c | |
311 | ||
312 | infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h | |
313 | $(CC) -c $(CFLAGS) $*.c | |
314 | ||
315 | inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h | |
316 | $(CC) -c $(CFLAGS) $*.c | |
317 | ||
318 | trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h | |
319 | $(CC) -c $(CFLAGS) $*.c | |
320 | ||
321 | uncompr.obj: uncompr.c zlib.h zconf.h | |
322 | $(CC) -c $(CFLAGS) $*.c | |
323 | ||
324 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | |
325 | $(CC) -c $(CFLAGS) $*.c | |
326 | ||
327 | xpm: .SYMBOLIC | |
328 | cd $(WXDIR)\src\xpm | |
329 | wmake -f makefile.wat all | |
330 | cd $(WXDIR)\src\msw | |
331 | ||
332 | clean_xpm: .SYMBOLIC | |
333 | cd $(WXDIR)\src\xpm | |
334 | wmake -f makefile.wat clean | |
335 | cd $(WXDIR)\src\msw | |
336 | ||
337 | png: .SYMBOLIC | |
338 | cd $(WXDIR)\src\png | |
339 | wmake -f makefile.wat all | |
340 | cd $(WXDIR)\src\msw | |
341 | ||
342 | clean_png: .SYMBOLIC | |
343 | cd $(WXDIR)\src\png | |
344 | wmake -f makefile.wat clean | |
345 | cd $(WXDIR)\src\msw | |
346 | ||
347 | zlib: .SYMBOLIC | |
348 | cd $(WXDIR)\src\zlib | |
349 | wmake -f makefile.wat all | |
350 | cd $(WXDIR)\src\msw | |
351 | ||
352 | clean_zlib: .SYMBOLIC | |
353 | cd $(WXDIR)\src\zlib | |
354 | wmake -f makefile.wat clean | |
355 | cd $(WXDIR)\src\msw | |
356 | ||
357 | MFTYPE=wat | |
358 | makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t | |
359 | cd $(WXWIN)\distrib\msw\tmake | |
360 | tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE) | |
361 | copy makefile.$(MFTYPE) $(WXWIN)\src\msw |