]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/tmake/wat.t
Misc release-related mods
[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 %wxCommon) {
33 $isCFile = $file =~ /\.c$/;
34 $file =~ s/cp?p?$/obj/;
35 $project{"WXCOMMONOBJS"} .= $file . " ";
36 $project{"WXCOBJS"} .= $file . " " if $isCFile;
37 }
38
39 foreach $file (sort keys %wxMSW) {
40 #! these files don't compile
41 next if $file =~ /^pnghand\./;
42
43 #! next if $wxGeneric{$file} =~ /\b16\b/;
44
45 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
46 my $isCFile = $file =~ /\.c$/;
47 $file =~ s/cp?p?$/obj/;
48 $project{"WXMSWOBJS"} .= $file . " ";
49 $project{"WXCOBJS"} .= $file . " " if $isCFile;
50 $project{"WXOLEOBJS"} .= $file . " " if $isOleObj
51 }
52 #$}
53 #! an attempt to embed '#' directly in the string somehow didn't work...
54 #$ $text = chr(35) . '!/binb/wmake.exe';
55
56 # This file was automatically generated by tmake at #$ Now()
57 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
58
59 #
60 # File: makefile.wat
61 # Author: Julian Smart
62 # Created: 1998
63 #
64 # Makefile : Builds wxWindows library for Watcom C++, WIN32
65 #
66 # NOTE: This file is generated from wat.t by tmake, but not all bugs have
67 # been removed from this process. If wxWindows doesn't compile,
68 # check the following and edit this makefile accordingly:
69 #
70 # - OLE-related files such as oleutils.cpp should have 'ole\' prepended
71 # to the path.
72 # - extended.c, gsocket.c, unzip.c must be compiled using $(CC), not $(CCC).
73 # They may also be wrongly specified as extended.cpp, etc.
74
75 WXDIR = ..\..
76
77 !include $(WXDIR)\src\makewat.env
78
79 WXLIB = $(WXDIR)\lib
80
81 LIBTARGET = $(WXLIB)\wx.lib
82 DUMMY=dummydll
83 # ODBCLIB = ..\..\contrib\odbc\odbc32.lib
84
85 EXTRATARGETS = png zlib jpeg tiff
86 EXTRATARGETSCLEAN = clean_png clean_zlib clean_jpeg clean_tiff
87 GENDIR=$(WXDIR)\src\generic
88 COMMDIR=$(WXDIR)\src\common
89 JPEGDIR=$(WXDIR)\src\jpeg
90 TIFFDIR=$(WXDIR)\src\tiff
91 MSWDIR=$(WXDIR)\src\msw
92 OLEDIR=$(MSWDIR)\ole
93
94 DOCDIR = $(WXDIR)\docs
95
96 GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "", " &\n\t")
97
98 # These are generic things that don't need to be compiled on MSW,
99 # but sometimes it's useful to do so for testing purposes.
100 NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "", " &\n\t")
101
102 COMMONOBJS = &
103 y_tab.obj &
104 #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
105
106 MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t")
107
108 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
109 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
110
111 all: $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS)
112
113 $(LIBTARGET) : $(OBJECTS)
114 %create tmp.lbc
115 @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
116 wlib /b /c /n /p=512 $^@ @tmp.lbc
117
118 #test : $(OBJECTS)
119 # %create tmp.lbc
120 # @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
121 # wlib /b /c /n /p=512 $^@ @tmp.lbc
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 .= $_ . ': $(';
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 }
149 else {
150 $suffix = "cpp";
151 $cc="CCC";
152 }
153 $text .= $_ . ".$suffix\n" .
154 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
155 }
156 #$}
157
158 ########################################################
159 # Common objects (always compiled)
160
161 #${
162 $_ = $project{"WXCOMMONOBJS"};
163 my @objs = split;
164 foreach (@objs) {
165 $text .= $_;
166 s/\.obj$//;
167 $text .= ': $(COMMDIR)\\';
168 my $suffix, $cc;
169 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
170 $suffix = "c";
171 $cc="CC";
172 }
173 else {
174 $suffix = "cpp";
175 $cc="CCC";
176 }
177 $text .= $_ . ".$suffix\n" .
178 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
179 }
180 #$}
181
182 y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
183 *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
184
185 # *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c
186
187 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
188 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
189
190 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
191 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
192
193 ########################################################
194 # Generic objects (not always compiled, depending on
195 # whether platforms have native implementations)
196
197 #${
198 $_ = $project{"WXGENERICOBJS"};
199 my @objs = split;
200 foreach (@objs) {
201 $text .= $_;
202 s/\.obj$//;
203 $text .= ': $(GENDIR)\\';
204 $text .= $_ . ".cpp\n" .
205 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
206 }
207 #$}
208
209 OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
210 trees$(O)
211 OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
212 infutil$(O) inffast$(O)
213
214 adler32.obj: adler32.c zutil.h zlib.h zconf.h
215 $(CC) -c $(CFLAGS) $*.c
216
217 compress.obj: compress.c zlib.h zconf.h
218 $(CC) -c $(CFLAGS) $*.c
219
220 crc32.obj: crc32.c zutil.h zlib.h zconf.h
221 $(CC) -c $(CFLAGS) $*.c
222
223 deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
224 $(CC) -c $(CFLAGS) $*.c
225
226 gzio.obj: gzio.c zutil.h zlib.h zconf.h
227 $(CC) -c $(CFLAGS) $*.c
228
229 infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
230 infcodes.h infutil.h
231 $(CC) -c $(CFLAGS) $*.c
232
233 infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
234 infcodes.h inffast.h
235 $(CC) -c $(CFLAGS) $*.c
236
237 inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
238 $(CC) -c $(CFLAGS) $*.c
239
240 inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
241 $(CC) -c $(CFLAGS) $*.c
242
243 infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
244 $(CC) -c $(CFLAGS) $*.c
245
246 inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
247 $(CC) -c $(CFLAGS) $*.c
248
249 trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
250 $(CC) -c $(CFLAGS) $*.c
251
252 uncompr.obj: uncompr.c zlib.h zconf.h
253 $(CC) -c $(CFLAGS) $*.c
254
255 zutil.obj: zutil.c zutil.h zlib.h zconf.h
256 $(CC) -c $(CFLAGS) $*.c
257
258 png: .SYMBOLIC
259 cd $(WXDIR)\src\png
260 wmake -f makefile.wat all
261 cd $(WXDIR)\src\msw
262
263 clean_png: .SYMBOLIC
264 cd $(WXDIR)\src\png
265 wmake -f makefile.wat clean
266 cd $(WXDIR)\src\msw
267
268 zlib: .SYMBOLIC
269 cd $(WXDIR)\src\zlib
270 wmake -f makefile.wat all
271 cd $(WXDIR)\src\msw
272
273 clean_zlib: .SYMBOLIC
274 cd $(WXDIR)\src\zlib
275 wmake -f makefile.wat clean
276 cd $(WXDIR)\src\msw
277
278 jpeg: .SYMBOLIC
279 cd $(WXDIR)\src\jpeg
280 wmake -f makefile.wat all
281 cd $(WXDIR)\src\msw
282
283 clean_jpeg: .SYMBOLIC
284 cd $(WXDIR)\src\jpeg
285 wmake -f makefile.wat clean
286 cd $(WXDIR)\src\msw
287
288 tiff: .SYMBOLIC
289 cd $(WXDIR)\src\tiff
290 wmake -f makefile.wat all
291 cd $(WXDIR)\src\msw
292
293 clean_tiff: .SYMBOLIC
294 cd $(WXDIR)\src\tiff
295 wmake -f makefile.wat clean
296 cd $(WXDIR)\src\msw
297
298 MFTYPE=wat
299 self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t
300 cd $(WXDIR)\distrib\msw\tmake
301 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
302 copy makefile.$(MFTYPE) $(WXDIR)\src\msw