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