]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/tmake/wat.t
Small distrib changes,
[wxWidgets.git] / distrib / msw / tmake / wat.t
CommitLineData
f2071dda
VZ
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
4d85bcd1 5#! TODO:
0cdf89ab 6#! - extended.c, unzip.c must be compiled with $(CC), not $(CCC).
4d85bcd1
JS
7#! - extended.c, unzip.c targets must be as per b32.t etc.
8#! - OLE files not generated correctly (need 'ole/' directory)
f2071dda
VZ
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
ace03f87
JS
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.
f2071dda
VZ
73
74WXDIR = ..\..
75
76!include $(WXDIR)\src\makewat.env
77
78WXLIB = $(WXDIR)\lib
79
80LIBTARGET = $(WXLIB)\wx.lib
81DUMMY=dummydll
82# ODBCLIB = ..\..\contrib\odbc\odbc32.lib
83
84EXTRATARGETS = xpm png zlib
85EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib
86GENDIR=$(WXDIR)\src\generic
87COMMDIR=$(WXDIR)\src\common
88XPMDIR=$(WXDIR)\src\xpm
89OLEDIR=ole
90MSWDIR=$(WXDIR)\src\msw
91
92DOCDIR = $(WXDIR)\docs
93
94GENERICOBJS= #$ 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.
98NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "", " &\n\t")
99
100COMMONOBJS = &
101 y_tab.obj &
102 #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
103
104MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t")
105
106# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
107OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
108
109all: $(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
9be9b974
RD
120
121
f2071dda
VZ
122clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
123 -erase *.obj
124 -erase $(LIBTARGET)
125 -erase *.pch
126 -erase *.err
127 -erase *.lbc
128
129cleanall: 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
162y_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
189crbuffri.obj: $(XPMDIR)\crbuffri.c
190 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
191
192crbuffrp.obj: $(XPMDIR)\crbuffrp.c
193 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
194
195crdatfri.obj: $(XPMDIR)\crdatfri.c
196 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
197
198crdatfrp.obj: $(XPMDIR)\crdatfrp.c
199 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
200
201create.obj: $(XPMDIR)\create.c
202 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
203
204crifrbuf.obj: $(XPMDIR)\crifrbuf.c
205 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
206
207crifrdat.obj: $(XPMDIR)\crifrdat.c
208 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
209
210crpfrbuf.obj: $(XPMDIR)\crpfrbuf.c
211 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
212
213crpfrdat.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
220hashtab.obj: $(XPMDIR)\hashtab.c
221 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
222
223misc.obj: $(XPMDIR)\misc.c
224 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
225
226parse.obj: $(XPMDIR)\parse.c
227 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
228
229rdftodat.obj: $(XPMDIR)\rdftodat.c
230 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
231
232rdftoi.obj: $(XPMDIR)\rdftoi.c
233 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
234
235rdftop.obj: $(XPMDIR)\rdftop.c
236 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
237
238rgb.obj: $(XPMDIR)\rgb.c
239 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
240
241scan.obj: $(XPMDIR)\scan.c
242 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
243
244simx.obj: $(XPMDIR)\simx.c
245 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
246
247wrffrdat.obj: $(XPMDIR)\wrffrdat.c
248 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
249
250wrffri.obj: $(XPMDIR)\wrffri.c
251 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
252
253wrffrp.obj: $(XPMDIR)\wrffrp.c
254 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
255
256OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
9be9b974 257 trees$(O)
f2071dda 258OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
9be9b974 259 infutil$(O) inffast$(O)
f2071dda
VZ
260
261adler32.obj: adler32.c zutil.h zlib.h zconf.h
262 $(CC) -c $(CFLAGS) $*.c
263
264compress.obj: compress.c zlib.h zconf.h
265 $(CC) -c $(CFLAGS) $*.c
266
267crc32.obj: crc32.c zutil.h zlib.h zconf.h
268 $(CC) -c $(CFLAGS) $*.c
269
270deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
271 $(CC) -c $(CFLAGS) $*.c
272
273gzio.obj: gzio.c zutil.h zlib.h zconf.h
274 $(CC) -c $(CFLAGS) $*.c
275
276infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
277 infcodes.h infutil.h
278 $(CC) -c $(CFLAGS) $*.c
279
280infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
281 infcodes.h inffast.h
282 $(CC) -c $(CFLAGS) $*.c
283
284inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
285 $(CC) -c $(CFLAGS) $*.c
286
287inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
288 $(CC) -c $(CFLAGS) $*.c
289
290infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
291 $(CC) -c $(CFLAGS) $*.c
292
293inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
294 $(CC) -c $(CFLAGS) $*.c
295
296trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
297 $(CC) -c $(CFLAGS) $*.c
298
299uncompr.obj: uncompr.c zlib.h zconf.h
300 $(CC) -c $(CFLAGS) $*.c
301
302zutil.obj: zutil.c zutil.h zlib.h zconf.h
303 $(CC) -c $(CFLAGS) $*.c
304
305xpm: .SYMBOLIC
306 cd $(WXDIR)\src\xpm
307 wmake -f makefile.wat all
308 cd $(WXDIR)\src\msw
309
310clean_xpm: .SYMBOLIC
311 cd $(WXDIR)\src\xpm
312 wmake -f makefile.wat clean
313 cd $(WXDIR)\src\msw
314
315png: .SYMBOLIC
316 cd $(WXDIR)\src\png
317 wmake -f makefile.wat all
318 cd $(WXDIR)\src\msw
319
320clean_png: .SYMBOLIC
321 cd $(WXDIR)\src\png
322 wmake -f makefile.wat clean
323 cd $(WXDIR)\src\msw
324
325zlib: .SYMBOLIC
326 cd $(WXDIR)\src\zlib
327 wmake -f makefile.wat all
328 cd $(WXDIR)\src\msw
329
330clean_zlib: .SYMBOLIC
331 cd $(WXDIR)\src\zlib
332 wmake -f makefile.wat clean
333 cd $(WXDIR)\src\msw
334
9be9b974
RD
335MFTYPE=wat
336makefile.$(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