]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/tmake/wat.t
Added files.lst to wxMotif distribution.
[wxWidgets.git] / distrib / msw / tmake / wat.t
CommitLineData
f2071dda
VZ
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
4d85bcd1 5#! TODO:
0cdf89ab 6#! - extended.c, unzip.c must be compiled with $(CC), not $(CCC).
4d85bcd1
JS
7#! - extended.c, unzip.c targets must be as per b32.t etc.
8#! - OLE files not generated correctly (need 'ole/' directory)
f2071dda
VZ
9#! Author: Vadim Zeitlin
10#! Created: 14.07.99
11#! Version: $Id$
12#!#############################################################################
f2071dda
VZ
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 }
17092e43
VS
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 }
f2071dda
VZ
38
39 foreach $file (sort keys %wxCommon) {
6a253da1
VS
40 next if $wxCommon{$file} =~ /\b(16|U)\b/;
41
d98fcc00 42 $isCFile = $file =~ /\.c$/;
f2071dda 43 $file =~ s/cp?p?$/obj/;
d98fcc00
VZ
44 $project{"WXCOMMONOBJS"} .= $file . " ";
45 $project{"WXCOBJS"} .= $file . " " if $isCFile;
f2071dda
VZ
46 }
47
48 foreach $file (sort keys %wxMSW) {
49 #! these files don't compile
50 next if $file =~ /^pnghand\./;
51
a925b006 52#! next if $wxGeneric{$file} =~ /\b16\b/;
f2071dda 53
d98fcc00
VZ
54 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
55 my $isCFile = $file =~ /\.c$/;
f2071dda 56 $file =~ s/cp?p?$/obj/;
d98fcc00
VZ
57 $project{"WXMSWOBJS"} .= $file . " ";
58 $project{"WXCOBJS"} .= $file . " " if $isCFile;
59 $project{"WXOLEOBJS"} .= $file . " " if $isOleObj
f2071dda
VZ
60 }
61#$}
d98fcc00
VZ
62#! an attempt to embed '#' directly in the string somehow didn't work...
63#$ $text = chr(35) . '!/binb/wmake.exe';
f2071dda 64
0f04dbf3 65# This file was automatically generated by tmake
f2071dda
VZ
66# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
67
f2071dda
VZ
68#
69# File: makefile.wat
70# Author: Julian Smart
71# Created: 1998
72#
73# Makefile : Builds wxWindows library for Watcom C++, WIN32
ace03f87
JS
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.
f2071dda
VZ
83
84WXDIR = ..\..
85
86!include $(WXDIR)\src\makewat.env
87
88WXLIB = $(WXDIR)\lib
89
90LIBTARGET = $(WXLIB)\wx.lib
91DUMMY=dummydll
92# ODBCLIB = ..\..\contrib\odbc\odbc32.lib
93
810aa7fc
VS
94EXTRATARGETS = png zlib jpeg tiff regex
95EXTRATARGETSCLEAN = clean_png clean_zlib clean_jpeg clean_tiff clean_regex
f2071dda
VZ
96GENDIR=$(WXDIR)\src\generic
97COMMDIR=$(WXDIR)\src\common
f6bcfd97
BP
98JPEGDIR=$(WXDIR)\src\jpeg
99TIFFDIR=$(WXDIR)\src\tiff
f2071dda 100MSWDIR=$(WXDIR)\src\msw
d98fcc00 101OLEDIR=$(MSWDIR)\ole
17092e43 102HTMLDIR=$(WXDIR)\src\html
f2071dda
VZ
103
104DOCDIR = $(WXDIR)\docs
105
106GENERICOBJS= #$ 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.
110NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "", " &\n\t")
111
112COMMONOBJS = &
113 y_tab.obj &
114 #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
115
116MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t")
117
17092e43
VS
118HTMLOBJS = #$ ExpandGlue("WXHTMLOBJS", "", " &\n\t")
119
f2071dda 120# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
17092e43 121OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS)
f2071dda 122
810aa7fc
VS
123ARCHINCDIR=$(WXDIR)\lib\msw
124SETUP_H=$(ARCHINCDIR)\wx\setup.h
125
126all: $(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 $@
f2071dda
VZ
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
9be9b974
RD
144
145
f2071dda
VZ
146clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
147 -erase *.obj
148 -erase $(LIBTARGET)
149 -erase *.pch
150 -erase *.err
151 -erase *.lbc
152
153cleanall: clean
154
155#${
156 $_ = $project{"WXMSWOBJS"};
157 my @objs = split;
158 foreach (@objs) {
159 $text .= $_ . ': $(';
160 s/\.obj$//;
d98fcc00 161 if ( $project{"WXOLEOBJS"} =~ /\b\Q$_\E\b/ ) {
f2071dda
VZ
162 $text .= 'OLEDIR)\\';
163 } else {
164 $text .= 'MSWDIR)\\';
165 }
d98fcc00
VZ
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";
f2071dda
VZ
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)\\';
d98fcc00
VZ
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";
f2071dda
VZ
201 }
202#$}
203
204y_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
17092e43
VS
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
f2071dda
VZ
247png: .SYMBOLIC
248 cd $(WXDIR)\src\png
249 wmake -f makefile.wat all
250 cd $(WXDIR)\src\msw
251
252clean_png: .SYMBOLIC
253 cd $(WXDIR)\src\png
254 wmake -f makefile.wat clean
255 cd $(WXDIR)\src\msw
256
257zlib: .SYMBOLIC
258 cd $(WXDIR)\src\zlib
259 wmake -f makefile.wat all
260 cd $(WXDIR)\src\msw
261
262clean_zlib: .SYMBOLIC
263 cd $(WXDIR)\src\zlib
264 wmake -f makefile.wat clean
265 cd $(WXDIR)\src\msw
266
f6bcfd97
BP
267jpeg: .SYMBOLIC
268 cd $(WXDIR)\src\jpeg
269 wmake -f makefile.wat all
270 cd $(WXDIR)\src\msw
271
272clean_jpeg: .SYMBOLIC
273 cd $(WXDIR)\src\jpeg
274 wmake -f makefile.wat clean
275 cd $(WXDIR)\src\msw
276
277tiff: .SYMBOLIC
278 cd $(WXDIR)\src\tiff
279 wmake -f makefile.wat all
280 cd $(WXDIR)\src\msw
281
282clean_tiff: .SYMBOLIC
283 cd $(WXDIR)\src\tiff
284 wmake -f makefile.wat clean
285 cd $(WXDIR)\src\msw
286
810aa7fc
VS
287regex: .SYMBOLIC
288 cd $(WXDIR)\src\regex
289 wmake -f makefile.wat all
290 cd $(WXDIR)\src\msw
291
292clean_regex: .SYMBOLIC
293 cd $(WXDIR)\src\regex
294 wmake -f makefile.wat clean
295 cd $(WXDIR)\src\msw
296
9be9b974 297MFTYPE=wat
457e6c54
JS
298self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t
299 cd $(WXDIR)\distrib\msw\tmake
9be9b974 300 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
457e6c54 301 copy makefile.$(MFTYPE) $(WXDIR)\src\msw