]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/tmake/wat.t
finally applied the helpbest patch
[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 #! 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 %wxHTML) {
33 next if $wxHTML{$file} =~ /\b16\b/;
34
35 $file =~ s/cp?p?$/obj/;
36 $project{"WXHTMLOBJS"} .= $file . " "
37 }
38
39 foreach $file (sort keys %wxCommon) {
40 $isCFile = $file =~ /\.c$/;
41 $file =~ s/cp?p?$/obj/;
42 $project{"WXCOMMONOBJS"} .= $file . " ";
43 $project{"WXCOBJS"} .= $file . " " if $isCFile;
44 }
45
46 foreach $file (sort keys %wxMSW) {
47 #! these files don't compile
48 next if $file =~ /^pnghand\./;
49
50 #! next if $wxGeneric{$file} =~ /\b16\b/;
51
52 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
53 my $isCFile = $file =~ /\.c$/;
54 $file =~ s/cp?p?$/obj/;
55 $project{"WXMSWOBJS"} .= $file . " ";
56 $project{"WXCOBJS"} .= $file . " " if $isCFile;
57 $project{"WXOLEOBJS"} .= $file . " " if $isOleObj
58 }
59 #$}
60 #! an attempt to embed '#' directly in the string somehow didn't work...
61 #$ $text = chr(35) . '!/binb/wmake.exe';
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
66 #
67 # File: makefile.wat
68 # Author: Julian Smart
69 # Created: 1998
70 #
71 # Makefile : Builds wxWindows library for Watcom C++, WIN32
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.
81
82 WXDIR = ..\..
83
84 !include $(WXDIR)\src\makewat.env
85
86 WXLIB = $(WXDIR)\lib
87
88 LIBTARGET = $(WXLIB)\wx.lib
89 DUMMY=dummydll
90 # ODBCLIB = ..\..\contrib\odbc\odbc32.lib
91
92 EXTRATARGETS = png zlib jpeg tiff
93 EXTRATARGETSCLEAN = clean_png clean_zlib clean_jpeg clean_tiff
94 GENDIR=$(WXDIR)\src\generic
95 COMMDIR=$(WXDIR)\src\common
96 JPEGDIR=$(WXDIR)\src\jpeg
97 TIFFDIR=$(WXDIR)\src\tiff
98 MSWDIR=$(WXDIR)\src\msw
99 OLEDIR=$(MSWDIR)\ole
100 HTMLDIR=$(WXDIR)\src\html
101
102 DOCDIR = $(WXDIR)\docs
103
104 GENERICOBJS= #$ 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.
108 NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "", " &\n\t")
109
110 COMMONOBJS = &
111 y_tab.obj &
112 #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
113
114 MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t")
115
116 HTMLOBJS = #$ ExpandGlue("WXHTMLOBJS", "", " &\n\t")
117
118 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
119 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS)
120
121 all: $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC
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
132
133
134 clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
135 -erase *.obj
136 -erase $(LIBTARGET)
137 -erase *.pch
138 -erase *.err
139 -erase *.lbc
140
141 cleanall: clean
142
143 #${
144 $_ = $project{"WXMSWOBJS"};
145 my @objs = split;
146 foreach (@objs) {
147 $text .= $_ . ': $(';
148 s/\.obj$//;
149 if ( $project{"WXOLEOBJS"} =~ /\b\Q$_\E\b/ ) {
150 $text .= 'OLEDIR)\\';
151 } else {
152 $text .= 'MSWDIR)\\';
153 }
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";
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)\\';
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";
189 }
190 #$}
191
192 y_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
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
236 OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
237 trees$(O)
238 OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
239 infutil$(O) inffast$(O)
240
241 adler32.obj: adler32.c zutil.h zlib.h zconf.h
242 $(CC) -c $(CFLAGS) $*.c
243
244 compress.obj: compress.c zlib.h zconf.h
245 $(CC) -c $(CFLAGS) $*.c
246
247 crc32.obj: crc32.c zutil.h zlib.h zconf.h
248 $(CC) -c $(CFLAGS) $*.c
249
250 deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
251 $(CC) -c $(CFLAGS) $*.c
252
253 gzio.obj: gzio.c zutil.h zlib.h zconf.h
254 $(CC) -c $(CFLAGS) $*.c
255
256 infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
257 infcodes.h infutil.h
258 $(CC) -c $(CFLAGS) $*.c
259
260 infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
261 infcodes.h inffast.h
262 $(CC) -c $(CFLAGS) $*.c
263
264 inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
265 $(CC) -c $(CFLAGS) $*.c
266
267 inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
268 $(CC) -c $(CFLAGS) $*.c
269
270 infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
271 $(CC) -c $(CFLAGS) $*.c
272
273 inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
274 $(CC) -c $(CFLAGS) $*.c
275
276 trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
277 $(CC) -c $(CFLAGS) $*.c
278
279 uncompr.obj: uncompr.c zlib.h zconf.h
280 $(CC) -c $(CFLAGS) $*.c
281
282 zutil.obj: zutil.c zutil.h zlib.h zconf.h
283 $(CC) -c $(CFLAGS) $*.c
284
285 png: .SYMBOLIC
286 cd $(WXDIR)\src\png
287 wmake -f makefile.wat all
288 cd $(WXDIR)\src\msw
289
290 clean_png: .SYMBOLIC
291 cd $(WXDIR)\src\png
292 wmake -f makefile.wat clean
293 cd $(WXDIR)\src\msw
294
295 zlib: .SYMBOLIC
296 cd $(WXDIR)\src\zlib
297 wmake -f makefile.wat all
298 cd $(WXDIR)\src\msw
299
300 clean_zlib: .SYMBOLIC
301 cd $(WXDIR)\src\zlib
302 wmake -f makefile.wat clean
303 cd $(WXDIR)\src\msw
304
305 jpeg: .SYMBOLIC
306 cd $(WXDIR)\src\jpeg
307 wmake -f makefile.wat all
308 cd $(WXDIR)\src\msw
309
310 clean_jpeg: .SYMBOLIC
311 cd $(WXDIR)\src\jpeg
312 wmake -f makefile.wat clean
313 cd $(WXDIR)\src\msw
314
315 tiff: .SYMBOLIC
316 cd $(WXDIR)\src\tiff
317 wmake -f makefile.wat all
318 cd $(WXDIR)\src\msw
319
320 clean_tiff: .SYMBOLIC
321 cd $(WXDIR)\src\tiff
322 wmake -f makefile.wat clean
323 cd $(WXDIR)\src\msw
324
325 MFTYPE=wat
326 self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t
327 cd $(WXDIR)\distrib\msw\tmake
328 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
329 copy makefile.$(MFTYPE) $(WXDIR)\src\msw