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