1 #!#############################################################################
3 #! Purpose: tmake template file from which makefile.wat is generated by running
4 #! tmake -t wat wxwin.pro -o makefile.wat
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
12 #!#############################################################################
14 #! include the code which parses filelist.txt file and initializes
15 #! %wxCommon, %wxGeneric and %wxMSW hashes.
16 IncludeTemplate("filelist.t");
18 #! now transform these hashes into $project tags
19 foreach $file (sort keys %wxGeneric) {
21 if ( $wxGeneric{$file} =~ /\b(PS|G|16|U)\b/ ) {
22 $tag = "WXNONESSENTIALOBJS";
25 $tag = "WXGENERICOBJS";
28 $file =~ s/cp?p?$/obj/;
29 $project{$tag} .= $file . " "
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;
39 foreach $file (sort keys %wxMSW) {
40 #! these files don't compile
41 next if $file =~ /^pnghand\./;
43 #! next if $wxGeneric{$file} =~ /\b16\b/;
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
53 #! an attempt to embed '#' directly in the string somehow didn't work...
54 #$ $text = chr(35) . '!/binb/wmake.exe';
56 # This file was automatically generated by tmake at #$ Now()
57 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
61 # Author: Julian Smart
64 # Makefile : Builds wxWindows library for Watcom C++, WIN32
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:
70 # - OLE-related files such as oleutils.cpp should have 'ole\' prepended
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.
77 !include $(WXDIR)\src\makewat.env
81 LIBTARGET = $(WXLIB)\wx.lib
83 # ODBCLIB = ..\..\contrib\odbc\odbc32.lib
85 EXTRATARGETS = xpm png zlib jpeg tiff
86 EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib clean_jpeg clean_tiff
87 GENDIR=$(WXDIR)\src\generic
88 COMMDIR=$(WXDIR)\src\common
89 XPMDIR=$(WXDIR)\src\xpm
90 JPEGDIR=$(WXDIR)\src\jpeg
91 TIFFDIR=$(WXDIR)\src\tiff
92 MSWDIR=$(WXDIR)\src\msw
95 DOCDIR = $(WXDIR)\docs
97 GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "", " &\n\t")
99 # These are generic things that don't need to be compiled on MSW,
100 # but sometimes it's useful to do so for testing purposes.
101 NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "", " &\n\t")
105 #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
107 MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t")
109 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
110 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
112 all: $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS)
114 $(LIBTARGET) : $(OBJECTS)
116 @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
117 wlib /b /c /n /p=512 $^@ @tmp.lbc
121 # @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
122 # wlib /b /c /n /p=512 $^@ @tmp.lbc
125 clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
135 $_ = $project{"WXMSWOBJS"};
138 $text .= $_ . ': $(';
140 if ( $project{"WXOLEOBJS"} =~ /\b\Q$_\E\b/ ) {
141 $text .= 'OLEDIR)\\';
143 $text .= 'MSWDIR)\\';
146 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
154 $text .= $_ . ".$suffix\n" .
155 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
159 ########################################################
160 # Common objects (always compiled)
163 $_ = $project{"WXCOMMONOBJS"};
168 $text .= ': $(COMMDIR)\\';
170 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
178 $text .= $_ . ".$suffix\n" .
179 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
183 y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
184 *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
186 # *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c
188 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
189 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
191 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
192 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
194 ########################################################
195 # Generic objects (not always compiled, depending on
196 # whether platforms have native implementations)
199 $_ = $project{"WXGENERICOBJS"};
204 $text .= ': $(GENDIR)\\';
205 $text .= $_ . ".cpp\n" .
206 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
210 crbuffri.obj: $(XPMDIR)\crbuffri.c
211 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
213 crbuffrp.obj: $(XPMDIR)\crbuffrp.c
214 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
216 crdatfri.obj: $(XPMDIR)\crdatfri.c
217 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
219 crdatfrp.obj: $(XPMDIR)\crdatfrp.c
220 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
222 create.obj: $(XPMDIR)\create.c
223 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
225 crifrbuf.obj: $(XPMDIR)\crifrbuf.c
226 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
228 crifrdat.obj: $(XPMDIR)\crifrdat.c
229 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
231 crpfrbuf.obj: $(XPMDIR)\crpfrbuf.c
232 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
234 crpfrdat.obj: $(XPMDIR)\crpfrdat.c
235 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
237 # TODO: what to do about this clash of filename????
238 #data.obj: $(XPMDIR)\data.c
239 # *$(CC) $(CPPFLAGS) $(IFLAGS) $<
241 hashtab.obj: $(XPMDIR)\hashtab.c
242 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
244 misc.obj: $(XPMDIR)\misc.c
245 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
247 parse.obj: $(XPMDIR)\parse.c
248 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
250 rdftodat.obj: $(XPMDIR)\rdftodat.c
251 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
253 rdftoi.obj: $(XPMDIR)\rdftoi.c
254 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
256 rdftop.obj: $(XPMDIR)\rdftop.c
257 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
259 rgb.obj: $(XPMDIR)\rgb.c
260 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
262 scan.obj: $(XPMDIR)\scan.c
263 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
265 simx.obj: $(XPMDIR)\simx.c
266 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
268 wrffrdat.obj: $(XPMDIR)\wrffrdat.c
269 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
271 wrffri.obj: $(XPMDIR)\wrffri.c
272 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
274 wrffrp.obj: $(XPMDIR)\wrffrp.c
275 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
277 OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
279 OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
280 infutil$(O) inffast$(O)
282 adler32.obj: adler32.c zutil.h zlib.h zconf.h
283 $(CC) -c $(CFLAGS) $*.c
285 compress.obj: compress.c zlib.h zconf.h
286 $(CC) -c $(CFLAGS) $*.c
288 crc32.obj: crc32.c zutil.h zlib.h zconf.h
289 $(CC) -c $(CFLAGS) $*.c
291 deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
292 $(CC) -c $(CFLAGS) $*.c
294 gzio.obj: gzio.c zutil.h zlib.h zconf.h
295 $(CC) -c $(CFLAGS) $*.c
297 infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
299 $(CC) -c $(CFLAGS) $*.c
301 infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
303 $(CC) -c $(CFLAGS) $*.c
305 inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
306 $(CC) -c $(CFLAGS) $*.c
308 inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
309 $(CC) -c $(CFLAGS) $*.c
311 infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
312 $(CC) -c $(CFLAGS) $*.c
314 inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
315 $(CC) -c $(CFLAGS) $*.c
317 trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
318 $(CC) -c $(CFLAGS) $*.c
320 uncompr.obj: uncompr.c zlib.h zconf.h
321 $(CC) -c $(CFLAGS) $*.c
323 zutil.obj: zutil.c zutil.h zlib.h zconf.h
324 $(CC) -c $(CFLAGS) $*.c
328 wmake -f makefile.wat all
333 wmake -f makefile.wat clean
338 wmake -f makefile.wat all
343 wmake -f makefile.wat clean
348 wmake -f makefile.wat all
351 clean_zlib: .SYMBOLIC
353 wmake -f makefile.wat clean
358 wmake -f makefile.wat all
361 clean_jpeg: .SYMBOLIC
363 wmake -f makefile.wat clean
368 wmake -f makefile.wat all
371 clean_tiff: .SYMBOLIC
373 wmake -f makefile.wat clean
377 self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t
378 cd $(WXDIR)\distrib\msw\tmake
379 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
380 copy makefile.$(MFTYPE) $(WXDIR)\src\msw