]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/tmake/watmgl.t
added more files to wxBase distrib (and unzip.h to the filelist)
[wxWidgets.git] / distrib / msw / tmake / watmgl.t
CommitLineData
f17fb297
VS
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 next if $wxGeneric{$file} =~ /\bNotMGL\b/;
21
22 $file =~ s/cp?p?$/obj/;
23 $project{"WXGENERICOBJS"} .= $file . " "
24 }
25
26 foreach $file (sort keys %wxHTML) {
27 next if $wxHTML{$file} =~ /\b16\b/;
28
29 $file =~ s/cp?p?$/obj/;
30 $project{"WXHTMLOBJS"} .= $file . " "
31 }
32
33 foreach $file (sort keys %wxCommon) {
34 next if $wxCommon{$file} =~ /\bNotMGL\b/;
35
36 $isCFile = $file =~ /\.c$/;
37 $file =~ s/cp?p?$/obj/;
38 $project{"WXCOMMONOBJS"} .= $file . " ";
39 $project{"WXCOBJS"} .= $file . " " if $isCFile;
40 }
41
42 foreach $file (sort keys %wxMGL) {
43 #! these files don't compile
44
45 $isBmpbase = $file =~ /bmpbase\.cpp$/;
46 $file =~ s/cp?p?$/obj/;
47 if ($isBmpbase) {
48 $project{"WXCOMMONOBJS"} .= $file . " ";
49 } else {
50 $project{"WXMGLOBJS"} .= $file . " ";
51 }
52 }
53
54 foreach $file (sort keys %wxUNIV) {
55 ($fileobj = $file) =~ s/cp?p?$/\o/;
56 my $tag = $wxUNIV{$file} =~ /Theme/ ? "WXUNIVTHEMEOBJS" : "WXUNIVOBJS";
57
58 $file =~ s/cp?p?$/obj/;
59 $project{$tag} .= $file . " ";
60 }
61#$}
62#! an attempt to embed '#' directly in the string somehow didn't work...
63#$ $text = chr(35) . '!/binb/wmake.exe';
64
65# This file was automatically generated by tmake at #$ Now()
66# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
67
68#
69# File: makefile.wat
70# Author: Julian Smart & Vaclav Slavik
71# Created: 1998
72#
73# Makefile : Builds wxWindows library for Watcom C++, DOS+MGL
74#
75# NOTE: This file is generated from wat.t by tmake, but not all bugs have
76# been removed from this process. If wxWindows doesn't compile,
77# check the following and edit this makefile accordingly:
78#
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
82WXDIR = ..\..
83
84!include makewat.env
85
86WXLIB = $(WXDIR)\lib
87
88LIBTARGET = $(WXLIB)\wx.lib
89DUMMY=dummydll
90# ODBCLIB = ..\..\contrib\odbc\odbc32.lib
91
92EXTRATARGETS = png zlib jpeg tiff regex
93EXTRATARGETSCLEAN = clean_png clean_zlib clean_jpeg clean_tiff clean_regex
94GENDIR=$(WXDIR)\src\generic
95COMMDIR=$(WXDIR)\src\common
96JPEGDIR=$(WXDIR)\src\jpeg
97TIFFDIR=$(WXDIR)\src\tiff
98MGLDIR=$(WXDIR)\src\mgl
99UNIVDIR=$(WXDIR)\src\univ
100UNIVTHEMEDIR=$(WXDIR)\src\univ\themes
101HTMLDIR=$(WXDIR)\src\html
102
103DOCDIR = $(WXDIR)\docs
104
105GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "", " &\n\t")
106
107COMMONOBJS = &
108 y_tab.obj &
109 #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
110
111MGLOBJS = #$ ExpandGlue("WXMGLOBJS", "", " &\n\t")
112
113UNIVOBJS = #$ ExpandGlue("WXUNIVOBJS", "", " &\n\t")
114
115UNIVTHEMEOBJS = #$ ExpandGlue("WXUNIVTHEMEOBJS", "", " &\n\t")
116
117HTMLOBJS = #$ ExpandGlue("WXHTMLOBJS", "", " &\n\t")
118
119# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
120OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MGLOBJS) $(UNIVOBJS) $(UNIVTHEMEOBJS) $(HTMLOBJS)
121
122all: $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC
123
124$(LIBTARGET) : $(OBJECTS)
125 %create tmp.lbc
126 @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
127 wlib /b /c /n /p=512 $^@ @tmp.lbc
128
129clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
130 -erase *.obj
131 -erase $(LIBTARGET)
132 -erase *.pch
133 -erase *.err
134 -erase *.lbc
135
136cleanall: clean
137
138#${
139 $_ = $project{"WXMGLOBJS"};
140 my @objs = split;
141 foreach (@objs) {
142 $text .= $_ . ': $(';
143 s/\.obj$//;
144 $text .= 'MGLDIR)\\';
145 my $suffix, $cc;
146 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
147 $suffix = "c";
148 $cc="CC";
149 }
150 else {
151 $suffix = "cpp";
152 $cc="CCC";
153 }
154 $text .= $_ . ".$suffix\n" .
155 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
156 }
157#$}
158
159########################################################
160# wxUNIVERSAL objects (always compiled)
161
162#${
163 $_ = $project{"WXUNIVOBJS"};
164 my @objs = split;
165 foreach (@objs) {
166 $text .= $_;
167 s/\.obj$//;
168 $text .= ': $(UNIVDIR)\\';
169 $text .= $_ . ".cpp\n" .
170 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
171 }
172#$}
173
174#${
175 $_ = $project{"WXUNIVTHEMEOBJS"};
176 my @objs = split;
177 foreach (@objs) {
178 $text .= $_;
179 s/\.obj$//;
180 $text .= ': $(UNIVTHEMEDIR)\\';
181 $text .= $_ . ".cpp\n" .
182 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
183 }
184#$}
185
186########################################################
187# Common objects (always compiled)
188
189#${
190 $_ = $project{"WXCOMMONOBJS"};
191 my @objs = split;
192 foreach (@objs) {
193 $text .= $_;
194 s/\.obj$//;
195 $text .= ': $(COMMDIR)\\';
196 my $suffix, $cc;
197 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
198 $suffix = "c";
199 $cc="CC";
200 }
201 else {
202 $suffix = "cpp";
203 $cc="CCC";
204 }
205 $text .= $_ . ".$suffix\n" .
206 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
207 }
208#$}
209
210y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
211 *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
212
213# *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c
214
215$(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
216 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
217
218$(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
219 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
220
221########################################################
222# Generic objects (not always compiled, depending on
223# whether platforms have native implementations)
224
225#${
226 $_ = $project{"WXGENERICOBJS"};
227 my @objs = split;
228 foreach (@objs) {
229 $text .= $_;
230 s/\.obj$//;
231 $text .= ': $(GENDIR)\\';
232 $text .= $_ . ".cpp\n" .
233 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
234 }
235#$}
236
237
238########################################################
239# HTML objects (always compiled)
240
241#${
242 $_ = $project{"WXHTMLOBJS"};
243 my @objs = split;
244 foreach (@objs) {
245 $text .= $_;
246 s/\.obj$//;
247 $text .= ': $(HTMLDIR)\\';
248 $text .= $_ . ".cpp\n" .
249 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
250 }
251#$}
252
253
254png: .SYMBOLIC
255 cd $(WXDIR)\src\png
256 wmake -f makefile.wat all
257 cd $(WXDIR)\src\mgl
258
259clean_png: .SYMBOLIC
260 cd $(WXDIR)\src\png
261 wmake -f makefile.wat clean
262 cd $(WXDIR)\src\mgl
263
264zlib: .SYMBOLIC
265 cd $(WXDIR)\src\zlib
266 wmake -f makefile.wat all
267 cd $(WXDIR)\src\mgl
268
269clean_zlib: .SYMBOLIC
270 cd $(WXDIR)\src\zlib
271 wmake -f makefile.wat clean
272 cd $(WXDIR)\src\mgl
273
274jpeg: .SYMBOLIC
275 cd $(WXDIR)\src\jpeg
276 wmake -f makefile.wat all
277 cd $(WXDIR)\src\mgl
278
279clean_jpeg: .SYMBOLIC
280 cd $(WXDIR)\src\jpeg
281 wmake -f makefile.wat clean
282 cd $(WXDIR)\src\mgl
283
284tiff: .SYMBOLIC
285 cd $(WXDIR)\src\tiff
286 wmake -f makefile.wat all
287 cd $(WXDIR)\src\mgl
288
289clean_tiff: .SYMBOLIC
290 cd $(WXDIR)\src\tiff
291 wmake -f makefile.wat clean
292 cd $(WXDIR)\src\mgl
293
294regex: .SYMBOLIC
295 cd $(WXDIR)\src\regex
296 wmake -f makefile.wat all
297 cd $(WXDIR)\src\mgl
298
299clean_regex: .SYMBOLIC
300 cd $(WXDIR)\src\regex
301 wmake -f makefile.wat clean
302 cd $(WXDIR)\src\mgl
303
304MFTYPE=watmgl
305self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t
306 cd $(WXDIR)\distrib\msw\tmake
307 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
308 copy makefile.$(MFTYPE) $(WXDIR)\src\mgl