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