]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/tmake/watmgl.t
reverted Julian's unintentional breakage of wxChoice
[wxWidgets.git] / distrib / msw / tmake / watmgl.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 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
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
82 WXDIR = ..\..
83
84 !include 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 regex
93 EXTRATARGETSCLEAN = clean_png clean_zlib clean_jpeg clean_tiff clean_regex
94 GENDIR=$(WXDIR)\src\generic
95 COMMDIR=$(WXDIR)\src\common
96 JPEGDIR=$(WXDIR)\src\jpeg
97 TIFFDIR=$(WXDIR)\src\tiff
98 MGLDIR=$(WXDIR)\src\mgl
99 UNIVDIR=$(WXDIR)\src\univ
100 UNIVTHEMEDIR=$(WXDIR)\src\univ\themes
101 HTMLDIR=$(WXDIR)\src\html
102
103 DOCDIR = $(WXDIR)\docs
104
105 GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "", " &\n\t")
106
107 COMMONOBJS = &
108 y_tab.obj &
109 #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
110
111 MGLOBJS = #$ ExpandGlue("WXMGLOBJS", "", " &\n\t")
112
113 UNIVOBJS = #$ ExpandGlue("WXUNIVOBJS", "", " &\n\t")
114
115 UNIVTHEMEOBJS = #$ ExpandGlue("WXUNIVTHEMEOBJS", "", " &\n\t")
116
117 HTMLOBJS = #$ ExpandGlue("WXHTMLOBJS", "", " &\n\t")
118
119 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
120 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MGLOBJS) $(UNIVOBJS) $(UNIVTHEMEOBJS) $(HTMLOBJS)
121
122 SETUP_H=$(ARCHINCDIR)\wx\setup.h
123
124 all: $(SETUP_H) $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC
125
126 $(ARCHINCDIR)\wx:
127 mkdir $(ARCHINCDIR)
128 mkdir $(ARCHINCDIR)\wx
129
130 $(SETUP_H): $(WXDIR)\include\wx\univ\setup.h $(ARCHINCDIR)\wx
131 copy $(WXDIR)\include\wx\univ\setup.h $@
132
133 $(LIBTARGET) : $(OBJECTS)
134 %create tmp.lbc
135 @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
136 wlib /b /c /n /p=512 $^@ @tmp.lbc
137
138 clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
139 -erase *.obj
140 -erase $(LIBTARGET)
141 -erase *.pch
142 -erase *.err
143 -erase *.lbc
144
145 cleanall: clean
146
147 #${
148 $_ = $project{"WXMGLOBJS"};
149 my @objs = split;
150 foreach (@objs) {
151 $text .= $_ . ': $(';
152 s/\.obj$//;
153 $text .= 'MGLDIR)\\';
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 # wxUNIVERSAL objects (always compiled)
170
171 #${
172 $_ = $project{"WXUNIVOBJS"};
173 my @objs = split;
174 foreach (@objs) {
175 $text .= $_;
176 s/\.obj$//;
177 $text .= ': $(UNIVDIR)\\';
178 $text .= $_ . ".cpp\n" .
179 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
180 }
181 #$}
182
183 #${
184 $_ = $project{"WXUNIVTHEMEOBJS"};
185 my @objs = split;
186 foreach (@objs) {
187 $text .= $_;
188 s/\.obj$//;
189 $text .= ': $(UNIVTHEMEDIR)\\';
190 $text .= $_ . ".cpp\n" .
191 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
192 }
193 #$}
194
195 ########################################################
196 # Common objects (always compiled)
197
198 #${
199 $_ = $project{"WXCOMMONOBJS"};
200 my @objs = split;
201 foreach (@objs) {
202 $text .= $_;
203 s/\.obj$//;
204 $text .= ': $(COMMDIR)\\';
205 my $suffix, $cc;
206 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
207 $suffix = "c";
208 $cc="CC";
209 }
210 else {
211 $suffix = "cpp";
212 $cc="CCC";
213 }
214 $text .= $_ . ".$suffix\n" .
215 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
216 }
217 #$}
218
219 y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
220 *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
221
222 # *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c
223
224 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
225 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
226
227 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
228 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
229
230 ########################################################
231 # Generic objects (not always compiled, depending on
232 # whether platforms have native implementations)
233
234 #${
235 $_ = $project{"WXGENERICOBJS"};
236 my @objs = split;
237 foreach (@objs) {
238 $text .= $_;
239 s/\.obj$//;
240 $text .= ': $(GENDIR)\\';
241 $text .= $_ . ".cpp\n" .
242 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
243 }
244 #$}
245
246
247 ########################################################
248 # HTML objects (always compiled)
249
250 #${
251 $_ = $project{"WXHTMLOBJS"};
252 my @objs = split;
253 foreach (@objs) {
254 $text .= $_;
255 s/\.obj$//;
256 $text .= ': $(HTMLDIR)\\';
257 $text .= $_ . ".cpp\n" .
258 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
259 }
260 #$}
261
262
263 png: .SYMBOLIC
264 cd $(WXDIR)\src\png
265 wmake -f makefile.wat all
266 cd $(WXDIR)\src\mgl
267
268 clean_png: .SYMBOLIC
269 cd $(WXDIR)\src\png
270 wmake -f makefile.wat clean
271 cd $(WXDIR)\src\mgl
272
273 zlib: .SYMBOLIC
274 cd $(WXDIR)\src\zlib
275 wmake -f makefile.wat all
276 cd $(WXDIR)\src\mgl
277
278 clean_zlib: .SYMBOLIC
279 cd $(WXDIR)\src\zlib
280 wmake -f makefile.wat clean
281 cd $(WXDIR)\src\mgl
282
283 jpeg: .SYMBOLIC
284 cd $(WXDIR)\src\jpeg
285 wmake -f makefile.wat all
286 cd $(WXDIR)\src\mgl
287
288 clean_jpeg: .SYMBOLIC
289 cd $(WXDIR)\src\jpeg
290 wmake -f makefile.wat clean
291 cd $(WXDIR)\src\mgl
292
293 tiff: .SYMBOLIC
294 cd $(WXDIR)\src\tiff
295 wmake -f makefile.wat all
296 cd $(WXDIR)\src\mgl
297
298 clean_tiff: .SYMBOLIC
299 cd $(WXDIR)\src\tiff
300 wmake -f makefile.wat clean
301 cd $(WXDIR)\src\mgl
302
303 regex: .SYMBOLIC
304 cd $(WXDIR)\src\regex
305 wmake -f makefile.wat all
306 cd $(WXDIR)\src\mgl
307
308 clean_regex: .SYMBOLIC
309 cd $(WXDIR)\src\regex
310 wmake -f makefile.wat clean
311 cd $(WXDIR)\src\mgl
312
313 MFTYPE=watmgl
314 self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t
315 cd $(WXDIR)\distrib\msw\tmake
316 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
317 copy makefile.$(MFTYPE) $(WXDIR)\src\mgl