]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/tmake/wat.t
Added wx/listbase.h with wxListCtrl types, so we can
[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 next if $wxCommon{$file} =~ /\b(16|U)\b/;
41
42 $isCFile = $file =~ /\.c$/;
43 $file =~ s/cp?p?$/obj/;
44 $project{"WXCOMMONOBJS"} .= $file . " ";
45 $project{"WXCOBJS"} .= $file . " " if $isCFile;
46 }
47
48 foreach $file (sort keys %wxMSW) {
49 #! these files don't compile
50 next if $file =~ /^pnghand\./;
51
52 #! next if $wxGeneric{$file} =~ /\b16\b/;
53
54 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
55 my $isCFile = $file =~ /\.c$/;
56 $file =~ s/cp?p?$/obj/;
57 $project{"WXMSWOBJS"} .= $file . " ";
58 $project{"WXCOBJS"} .= $file . " " if $isCFile;
59 $project{"WXOLEOBJS"} .= $file . " " if $isOleObj
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
71 # Created: 1998
72 #
73 # Makefile : Builds wxWindows library for Watcom C++, WIN32
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 # - OLE-related files such as oleutils.cpp should have 'ole\' prepended
80 # to the path.
81 # - extended.c, gsocket.c, unzip.c must be compiled using $(CC), not $(CCC).
82 # They may also be wrongly specified as extended.cpp, etc.
83
84 WXDIR = ..\..
85
86 !include $(WXDIR)\src\makewat.env
87
88 WXLIB = $(WXDIR)\lib
89
90 LIBTARGET = $(WXLIB)\wx.lib
91 DUMMY=dummydll
92 # ODBCLIB = ..\..\contrib\odbc\odbc32.lib
93
94 EXTRATARGETS = png zlib jpeg tiff regex
95 EXTRATARGETSCLEAN = clean_png clean_zlib clean_jpeg clean_tiff clean_regex
96 GENDIR=$(WXDIR)\src\generic
97 COMMDIR=$(WXDIR)\src\common
98 JPEGDIR=$(WXDIR)\src\jpeg
99 TIFFDIR=$(WXDIR)\src\tiff
100 MSWDIR=$(WXDIR)\src\msw
101 OLEDIR=$(MSWDIR)\ole
102 HTMLDIR=$(WXDIR)\src\html
103
104 DOCDIR = $(WXDIR)\docs
105
106 GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "", " &\n\t")
107
108 # These are generic things that don't need to be compiled on MSW,
109 # but sometimes it's useful to do so for testing purposes.
110 NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "", " &\n\t")
111
112 COMMONOBJS = &
113 y_tab.obj &
114 #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
115
116 MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t")
117
118 HTMLOBJS = #$ ExpandGlue("WXHTMLOBJS", "", " &\n\t")
119
120 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
121 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS)
122
123 ARCHINCDIR=$(WXDIR)\lib\msw
124 SETUP_H=$(ARCHINCDIR)\wx\setup.h
125
126 all: $(SETUP_H) $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC
127
128 $(ARCHINCDIR)\wx:
129 mkdir $(ARCHINCDIR)
130 mkdir $(ARCHINCDIR)\wx
131
132 $(SETUP_H): $(WXDIR)\include\wx\msw\setup.h $(ARCHINCDIR)\wx
133 copy $(WXDIR)\include\wx\msw\setup.h $@
134
135 $(LIBTARGET) : $(OBJECTS)
136 %create tmp.lbc
137 @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
138 wlib /b /c /n /p=512 $^@ @tmp.lbc
139
140 #test : $(OBJECTS)
141 # %create tmp.lbc
142 # @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
143 # wlib /b /c /n /p=512 $^@ @tmp.lbc
144
145
146 clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
147 -erase *.obj
148 -erase $(LIBTARGET)
149 -erase *.pch
150 -erase *.err
151 -erase *.lbc
152
153 cleanall: clean
154
155 #${
156 $_ = $project{"WXMSWOBJS"};
157 my @objs = split;
158 foreach (@objs) {
159 $text .= $_ . ': $(';
160 s/\.obj$//;
161 if ( $project{"WXOLEOBJS"} =~ /\b\Q$_\E\b/ ) {
162 $text .= 'OLEDIR)\\';
163 } else {
164 $text .= 'MSWDIR)\\';
165 }
166 my $suffix, $cc;
167 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
168 $suffix = "c";
169 $cc="CC";
170 }
171 else {
172 $suffix = "cpp";
173 $cc="CCC";
174 }
175 $text .= $_ . ".$suffix\n" .
176 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
177 }
178 #$}
179
180 ########################################################
181 # Common objects (always compiled)
182
183 #${
184 $_ = $project{"WXCOMMONOBJS"};
185 my @objs = split;
186 foreach (@objs) {
187 $text .= $_;
188 s/\.obj$//;
189 $text .= ': $(COMMDIR)\\';
190 my $suffix, $cc;
191 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
192 $suffix = "c";
193 $cc="CC";
194 }
195 else {
196 $suffix = "cpp";
197 $cc="CCC";
198 }
199 $text .= $_ . ".$suffix\n" .
200 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
201 }
202 #$}
203
204 y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
205 *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
206
207 # *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c
208
209 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
210 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
211
212 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
213 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
214
215 ########################################################
216 # Generic objects (not always compiled, depending on
217 # whether platforms have native implementations)
218
219 #${
220 $_ = $project{"WXGENERICOBJS"};
221 my @objs = split;
222 foreach (@objs) {
223 $text .= $_;
224 s/\.obj$//;
225 $text .= ': $(GENDIR)\\';
226 $text .= $_ . ".cpp\n" .
227 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
228 }
229 #$}
230
231
232 ########################################################
233 # HTML objects (always compiled)
234
235 #${
236 $_ = $project{"WXHTMLOBJS"};
237 my @objs = split;
238 foreach (@objs) {
239 $text .= $_;
240 s/\.obj$//;
241 $text .= ': $(HTMLDIR)\\';
242 $text .= $_ . ".cpp\n" .
243 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
244 }
245 #$}
246
247 png: .SYMBOLIC
248 cd $(WXDIR)\src\png
249 wmake -f makefile.wat all
250 cd $(WXDIR)\src\msw
251
252 clean_png: .SYMBOLIC
253 cd $(WXDIR)\src\png
254 wmake -f makefile.wat clean
255 cd $(WXDIR)\src\msw
256
257 zlib: .SYMBOLIC
258 cd $(WXDIR)\src\zlib
259 wmake -f makefile.wat all
260 cd $(WXDIR)\src\msw
261
262 clean_zlib: .SYMBOLIC
263 cd $(WXDIR)\src\zlib
264 wmake -f makefile.wat clean
265 cd $(WXDIR)\src\msw
266
267 jpeg: .SYMBOLIC
268 cd $(WXDIR)\src\jpeg
269 wmake -f makefile.wat all
270 cd $(WXDIR)\src\msw
271
272 clean_jpeg: .SYMBOLIC
273 cd $(WXDIR)\src\jpeg
274 wmake -f makefile.wat clean
275 cd $(WXDIR)\src\msw
276
277 tiff: .SYMBOLIC
278 cd $(WXDIR)\src\tiff
279 wmake -f makefile.wat all
280 cd $(WXDIR)\src\msw
281
282 clean_tiff: .SYMBOLIC
283 cd $(WXDIR)\src\tiff
284 wmake -f makefile.wat clean
285 cd $(WXDIR)\src\msw
286
287 regex: .SYMBOLIC
288 cd $(WXDIR)\src\regex
289 wmake -f makefile.wat all
290 cd $(WXDIR)\src\msw
291
292 clean_regex: .SYMBOLIC
293 cd $(WXDIR)\src\regex
294 wmake -f makefile.wat clean
295 cd $(WXDIR)\src\msw
296
297 MFTYPE=wat
298 self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t
299 cd $(WXDIR)\distrib\msw\tmake
300 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
301 copy makefile.$(MFTYPE) $(WXDIR)\src\msw