]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/tmake/wat.t
added wxDisplay files
[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 #! Author: Vadim Zeitlin
6 #! Created: 14.07.99
7 #! Version: $Id$
8 #!#############################################################################
9 #${
10 #! include the code which parses filelist.txt file and initializes
11 #! %wxCommon, %wxGeneric and %wxMSW hashes.
12 IncludeTemplate("filelist.t");
13
14 #! now transform these hashes into $project tags
15 foreach $file (sort keys %wxGeneric) {
16 my $tag = "";
17 if ( $wxGeneric{$file} =~ /\b(PS|G|16|U)\b/ ) {
18 $tag = "WXNONESSENTIALOBJS";
19 }
20 else {
21 $tag = "WXGENERICOBJS";
22 }
23
24 $file =~ s/cp?p?$/obj/;
25 $project{$tag} .= $file . " "
26 }
27
28 foreach $file (sort keys %wxHTML) {
29 next if $wxHTML{$file} =~ /\b16\b/;
30
31 $file =~ s/cp?p?$/obj/;
32 $project{"WXHTMLOBJS"} .= $file . " "
33 }
34
35 foreach $file (sort keys %wxCommon) {
36 next if $wxCommon{$file} =~ /\b(16|U)\b/;
37
38 $isCFile = $file =~ /\.c$/;
39 $file =~ s/cp?p?$/obj/;
40 $project{"WXCOMMONOBJS"} .= $file . " ";
41 $project{"WXCOBJS"} .= $file . " " if $isCFile;
42 }
43
44 foreach $file (sort keys %wxMSW) {
45 #! these files don't compile
46 next if $file =~ /^pnghand\./;
47
48 next if $wxMSW{$file} =~ /\b16\b/;
49
50 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
51 my $isCFile = $file =~ /\.c$/;
52 $file =~ s/cp?p?$/obj/;
53 $project{"WXMSWOBJS"} .= $file . " ";
54 $project{"WXCOBJS"} .= $file . " " if $isCFile;
55 $project{"WXOLEOBJS"} .= $file . " " if $isOleObj
56 }
57 #$}
58 #! an attempt to embed '#' directly in the string somehow didn't work...
59 #$ $text = chr(35) . '!/binb/wmake.exe';
60
61 # This file was automatically generated by tmake
62 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
63
64 #
65 # File: makefile.wat
66 # Author: Julian Smart
67 # Created: 1998
68 #
69 # Makefile : Builds wxWindows library for Watcom C++, WIN32
70 !include ..\makewat.env
71
72 LIBTARGET = $(WXDIR)\lib\$(LIBNAME).lib
73
74 EXTRATARGETS = png zlib jpeg tiff regex
75 EXTRATARGETSCLEAN = clean_png clean_zlib clean_jpeg clean_tiff clean_regex
76 GENDIR=$(WXDIR)\src\generic
77 COMMDIR=$(WXDIR)\src\common
78 JPEGDIR=$(WXDIR)\src\jpeg
79 TIFFDIR=$(WXDIR)\src\tiff
80 MSWDIR=$(WXDIR)\src\msw
81 OLEDIR=$(MSWDIR)\ole
82 HTMLDIR=$(WXDIR)\src\html
83
84 DOCDIR = $(WXDIR)\docs
85
86 GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
87
88 # These are generic things that don't need to be compiled on MSW,
89 # but sometimes it's useful to do so for testing purposes.
90 NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
91
92 COMMONOBJS = &
93 $(OUTPUTDIR)\y_tab.obj &
94 #$ ExpandGlue("WXCOMMONOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
95
96 MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
97
98 HTMLOBJS = #$ ExpandGlue("WXHTMLOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
99
100 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
101 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS)
102
103 SETUP_H=$(ARCHINCDIR)\wx\setup.h
104
105 all: $(SETUP_H) $(OUTPUTDIR) $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC
106
107 $(ARCHINCDIR)\wx:
108 mkdir $(ARCHINCDIR)
109 mkdir $(ARCHINCDIR)\wx
110
111 $(OUTPUTDIR):
112 @if not exist $^@ mkdir $^@
113
114 $(SETUP_H): $(WXDIR)\include\wx\msw\setup.h $(ARCHINCDIR)\wx
115 copy $(WXDIR)\include\wx\msw\setup.h $@
116
117 LBCFILE=wx$(TOOLKIT).lbc
118 $(LIBTARGET) : $(OBJECTS)
119 %create $(LBCFILE)
120 @for %i in ( $(OBJECTS) ) do @%append $(LBCFILE) +%i
121 wlib /b /c /n $(LIBPAGESIZE) $^@ @$(LBCFILE)
122
123
124 clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
125 -erase *.obj
126 -erase $(LIBTARGET)
127 -erase *.pch
128 -erase *.err
129 -erase *.lbc
130
131 cleanall: clean
132
133 #${
134 $_ = $project{"WXMSWOBJS"};
135 my @objs = split;
136 foreach (@objs) {
137 $text .= "\$(OUTPUTDIR)\\" . $_ . ': $(';
138 s/\.obj$//;
139 if ( $project{"WXOLEOBJS"} =~ /\b\Q$_\E\b/ ) {
140 $text .= 'OLEDIR)\\';
141 } else {
142 $text .= 'MSWDIR)\\';
143 }
144 my $suffix, $cc;
145 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
146 $suffix = "c";
147 $cc="CC";
148 $flags="CFLAGS";
149 }
150 else {
151 $suffix = "cpp";
152 $cc="CXX";
153 $flags="CXXFLAGS";
154 }
155 $text .= $_ . ".$suffix\n" .
156 " *\$($cc) \$($flags) \$<" . "\n\n";
157 }
158 #$}
159
160 ########################################################
161 # Common objects (always compiled)
162
163 #${
164 $_ = $project{"WXCOMMONOBJS"};
165 my @objs = split;
166 foreach (@objs) {
167 $text .= "\$(OUTPUTDIR)\\" . $_;
168 s/\.obj$//;
169 $text .= ': $(COMMDIR)\\';
170 my $suffix, $cc;
171 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
172 $suffix = "c";
173 $cc="CC";
174 $flags="CFLAGS";
175 }
176 else {
177 $suffix = "cpp";
178 $cc="CXX";
179 $flags="CXXFLAGS";
180 }
181 $text .= $_ . ".$suffix\n" .
182 " *\$($cc) \$($flags) \$<" . "\n\n";
183 }
184 #$}
185
186 $(OUTPUTDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
187 *$(CC) $(CFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
188
189 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
190 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
191
192 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
193 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
194
195 ########################################################
196 # Generic objects (not always compiled, depending on
197 # whether platforms have native implementations)
198
199 #${
200 $_ = $project{"WXGENERICOBJS"};
201 my @objs = split;
202 foreach (@objs) {
203 $text .= "\$(OUTPUTDIR)\\" . $_;
204 s/\.obj$//;
205 $text .= ': $(GENDIR)\\';
206 $text .= $_ . ".cpp\n" .
207 ' *$(CXX) $(CXXFLAGS) $<' . "\n\n";
208 }
209 #$}
210
211
212 ########################################################
213 # HTML objects (always compiled)
214
215 #${
216 $_ = $project{"WXHTMLOBJS"};
217 my @objs = split;
218 foreach (@objs) {
219 $text .= "\$(OUTPUTDIR)\\" . $_;
220 s/\.obj$//;
221 $text .= ': $(HTMLDIR)\\';
222 $text .= $_ . ".cpp\n" .
223 ' *$(CXX) $(CXXFLAGS) $<' . "\n\n";
224 }
225 #$}
226
227 png: .SYMBOLIC
228 cd $(WXDIR)\src\png
229 wmake -f makefile.wat all
230 cd $(WXDIR)\src\msw
231
232 clean_png: .SYMBOLIC
233 cd $(WXDIR)\src\png
234 wmake -f makefile.wat clean
235 cd $(WXDIR)\src\msw
236
237 zlib: .SYMBOLIC
238 cd $(WXDIR)\src\zlib
239 wmake -f makefile.wat all
240 cd $(WXDIR)\src\msw
241
242 clean_zlib: .SYMBOLIC
243 cd $(WXDIR)\src\zlib
244 wmake -f makefile.wat clean
245 cd $(WXDIR)\src\msw
246
247 jpeg: .SYMBOLIC
248 cd $(WXDIR)\src\jpeg
249 wmake -f makefile.wat all
250 cd $(WXDIR)\src\msw
251
252 clean_jpeg: .SYMBOLIC
253 cd $(WXDIR)\src\jpeg
254 wmake -f makefile.wat clean
255 cd $(WXDIR)\src\msw
256
257 tiff: .SYMBOLIC
258 cd $(WXDIR)\src\tiff
259 wmake -f makefile.wat all
260 cd $(WXDIR)\src\msw
261
262 clean_tiff: .SYMBOLIC
263 cd $(WXDIR)\src\tiff
264 wmake -f makefile.wat clean
265 cd $(WXDIR)\src\msw
266
267 regex: .SYMBOLIC
268 cd $(WXDIR)\src\regex
269 wmake -f makefile.wat all
270 cd $(WXDIR)\src\msw
271
272 clean_regex: .SYMBOLIC
273 cd $(WXDIR)\src\regex
274 wmake -f makefile.wat clean
275 cd $(WXDIR)\src\msw
276
277 MFTYPE=wat
278 self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t
279 cd $(WXDIR)\distrib\msw\tmake
280 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
281 copy makefile.$(MFTYPE) $(WXDIR)\src\msw