]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/tmake/wat.t
2e7350af2e763aaec10f93fe86d3853cd2d9f2f2
[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 WXDIR = ..\..
66
67 !include $(WXDIR)\src\makewat.env
68
69 WXLIB = $(WXDIR)\lib
70
71 LIBTARGET = $(WXLIB)\wx.lib
72 DUMMY=dummydll
73 # ODBCLIB = ..\..\contrib\odbc\odbc32.lib
74
75 EXTRATARGETS = xpm png zlib
76 EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib
77 GENDIR=$(WXDIR)\src\generic
78 COMMDIR=$(WXDIR)\src\common
79 XPMDIR=$(WXDIR)\src\xpm
80 OLEDIR=ole
81 MSWDIR=$(WXDIR)\src\msw
82
83 DOCDIR = $(WXDIR)\docs
84
85 GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "", " &\n\t")
86
87 # These are generic things that don't need to be compiled on MSW,
88 # but sometimes it's useful to do so for testing purposes.
89 NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "", " &\n\t")
90
91 COMMONOBJS = &
92 y_tab.obj &
93 #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
94
95 MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t")
96
97 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
98 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
99
100 all: $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS)
101
102 $(LIBTARGET) : $(OBJECTS)
103 %create tmp.lbc
104 @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
105 wlib /b /c /n /p=512 $^@ @tmp.lbc
106
107 #test : $(OBJECTS)
108 # %create tmp.lbc
109 # @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
110 # wlib /b /c /n /p=512 $^@ @tmp.lbc
111
112
113 clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
114 -erase *.obj
115 -erase $(LIBTARGET)
116 -erase *.pch
117 -erase *.err
118 -erase *.lbc
119
120 cleanall: clean
121
122 #${
123 $_ = $project{"WXMSWOBJS"};
124 my @objs = split;
125 foreach (@objs) {
126 $text .= $_ . ': $(';
127 s/\.obj$//;
128 if ( $wxMSW{$_} =~ /\bO\b/ ) {
129 $text .= 'OLEDIR)\\';
130 } else {
131 $text .= 'MSWDIR)\\';
132 }
133 $text .= $_ . ".cpp\n" .
134 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
135 }
136 #$}
137
138 ########################################################
139 # Common objects (always compiled)
140
141 #${
142 $_ = $project{"WXCOMMONOBJS"};
143 my @objs = split;
144 foreach (@objs) {
145 $text .= $_;
146 s/\.obj$//;
147 $text .= ': $(COMMDIR)\\';
148 $text .= $_ . ".cpp\n" .
149 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
150 }
151 #$}
152
153 y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
154 *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
155
156 # *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c
157
158 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
159 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
160
161 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
162 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
163
164 ########################################################
165 # Generic objects (not always compiled, depending on
166 # whether platforms have native implementations)
167
168 #${
169 $_ = $project{"WXGENERICOBJS"};
170 my @objs = split;
171 foreach (@objs) {
172 $text .= $_;
173 s/\.obj$//;
174 $text .= ': $(GENDIR)\\';
175 $text .= $_ . ".cpp\n" .
176 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
177 }
178 #$}
179
180 crbuffri.obj: $(XPMDIR)\crbuffri.c
181 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
182
183 crbuffrp.obj: $(XPMDIR)\crbuffrp.c
184 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
185
186 crdatfri.obj: $(XPMDIR)\crdatfri.c
187 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
188
189 crdatfrp.obj: $(XPMDIR)\crdatfrp.c
190 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
191
192 create.obj: $(XPMDIR)\create.c
193 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
194
195 crifrbuf.obj: $(XPMDIR)\crifrbuf.c
196 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
197
198 crifrdat.obj: $(XPMDIR)\crifrdat.c
199 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
200
201 crpfrbuf.obj: $(XPMDIR)\crpfrbuf.c
202 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
203
204 crpfrdat.obj: $(XPMDIR)\crpfrdat.c
205 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
206
207 # TODO: what to do about this clash of filename????
208 #data.obj: $(XPMDIR)\data.c
209 # *$(CC) $(CPPFLAGS) $(IFLAGS) $<
210
211 hashtab.obj: $(XPMDIR)\hashtab.c
212 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
213
214 misc.obj: $(XPMDIR)\misc.c
215 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
216
217 parse.obj: $(XPMDIR)\parse.c
218 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
219
220 rdftodat.obj: $(XPMDIR)\rdftodat.c
221 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
222
223 rdftoi.obj: $(XPMDIR)\rdftoi.c
224 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
225
226 rdftop.obj: $(XPMDIR)\rdftop.c
227 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
228
229 rgb.obj: $(XPMDIR)\rgb.c
230 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
231
232 scan.obj: $(XPMDIR)\scan.c
233 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
234
235 simx.obj: $(XPMDIR)\simx.c
236 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
237
238 wrffrdat.obj: $(XPMDIR)\wrffrdat.c
239 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
240
241 wrffri.obj: $(XPMDIR)\wrffri.c
242 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
243
244 wrffrp.obj: $(XPMDIR)\wrffrp.c
245 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
246
247 OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
248 trees$(O)
249 OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
250 infutil$(O) inffast$(O)
251
252 adler32.obj: adler32.c zutil.h zlib.h zconf.h
253 $(CC) -c $(CFLAGS) $*.c
254
255 compress.obj: compress.c zlib.h zconf.h
256 $(CC) -c $(CFLAGS) $*.c
257
258 crc32.obj: crc32.c zutil.h zlib.h zconf.h
259 $(CC) -c $(CFLAGS) $*.c
260
261 deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
262 $(CC) -c $(CFLAGS) $*.c
263
264 gzio.obj: gzio.c zutil.h zlib.h zconf.h
265 $(CC) -c $(CFLAGS) $*.c
266
267 infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
268 infcodes.h infutil.h
269 $(CC) -c $(CFLAGS) $*.c
270
271 infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
272 infcodes.h inffast.h
273 $(CC) -c $(CFLAGS) $*.c
274
275 inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
276 $(CC) -c $(CFLAGS) $*.c
277
278 inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
279 $(CC) -c $(CFLAGS) $*.c
280
281 infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
282 $(CC) -c $(CFLAGS) $*.c
283
284 inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
285 $(CC) -c $(CFLAGS) $*.c
286
287 trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
288 $(CC) -c $(CFLAGS) $*.c
289
290 uncompr.obj: uncompr.c zlib.h zconf.h
291 $(CC) -c $(CFLAGS) $*.c
292
293 zutil.obj: zutil.c zutil.h zlib.h zconf.h
294 $(CC) -c $(CFLAGS) $*.c
295
296 xpm: .SYMBOLIC
297 cd $(WXDIR)\src\xpm
298 wmake -f makefile.wat all
299 cd $(WXDIR)\src\msw
300
301 clean_xpm: .SYMBOLIC
302 cd $(WXDIR)\src\xpm
303 wmake -f makefile.wat clean
304 cd $(WXDIR)\src\msw
305
306 png: .SYMBOLIC
307 cd $(WXDIR)\src\png
308 wmake -f makefile.wat all
309 cd $(WXDIR)\src\msw
310
311 clean_png: .SYMBOLIC
312 cd $(WXDIR)\src\png
313 wmake -f makefile.wat clean
314 cd $(WXDIR)\src\msw
315
316 zlib: .SYMBOLIC
317 cd $(WXDIR)\src\zlib
318 wmake -f makefile.wat all
319 cd $(WXDIR)\src\msw
320
321 clean_zlib: .SYMBOLIC
322 cd $(WXDIR)\src\zlib
323 wmake -f makefile.wat clean
324 cd $(WXDIR)\src\msw
325
326 MFTYPE=wat
327 makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
328 cd $(WXWIN)\distrib\msw\tmake
329 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
330 copy makefile.$(MFTYPE) $(WXWIN)\src\msw