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