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 %wxHTML) {
33 next if $wxHTML{$file} =~ /\b16\b/;
35 $file =~ s/cp?p?$/obj/;
36 $project{"WXHTMLOBJS"} .= $file . " "
39 foreach $file (sort keys %wxCommon) {
40 $isCFile = $file =~ /\.c$/;
41 $file =~ s/cp?p?$/obj/;
42 $project{"WXCOMMONOBJS"} .= $file . " ";
43 $project{"WXCOBJS"} .= $file . " " if $isCFile;
46 foreach $file (sort keys %wxMSW) {
47 #! these files don't compile
48 next if $file =~ /^pnghand\./;
50 #! next if $wxGeneric{$file} =~ /\b16\b/;
52 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
53 my $isCFile = $file =~ /\.c$/;
54 $file =~ s/cp?p?$/obj/;
55 $project{"WXMSWOBJS"} .= $file . " ";
56 $project{"WXCOBJS"} .= $file . " " if $isCFile;
57 $project{"WXOLEOBJS"} .= $file . " " if $isOleObj
60 #! an attempt to embed '#' directly in the string somehow didn't work...
61 #$ $text = chr(35) . '!/binb/wmake.exe';
63 # This file was automatically generated by tmake at #$ Now()
64 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
68 # Author: Julian Smart
71 # Makefile : Builds wxWindows library for Watcom C++, WIN32
73 # NOTE: This file is generated from wat.t by tmake, but not all bugs have
74 # been removed from this process. If wxWindows doesn't compile,
75 # check the following and edit this makefile accordingly:
77 # - OLE-related files such as oleutils.cpp should have 'ole\' prepended
79 # - extended.c, gsocket.c, unzip.c must be compiled using $(CC), not $(CCC).
80 # They may also be wrongly specified as extended.cpp, etc.
84 !include $(WXDIR)\src\makewat.env
88 LIBTARGET = $(WXLIB)\wx.lib
90 # ODBCLIB = ..\..\contrib\odbc\odbc32.lib
92 EXTRATARGETS = png zlib jpeg tiff
93 EXTRATARGETSCLEAN = clean_png clean_zlib clean_jpeg clean_tiff
94 GENDIR=$(WXDIR)\src\generic
95 COMMDIR=$(WXDIR)\src\common
96 JPEGDIR=$(WXDIR)\src\jpeg
97 TIFFDIR=$(WXDIR)\src\tiff
98 MSWDIR=$(WXDIR)\src\msw
100 HTMLDIR=$(WXDIR)\src\html
102 DOCDIR = $(WXDIR)\docs
104 GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "", " &\n\t")
106 # These are generic things that don't need to be compiled on MSW,
107 # but sometimes it's useful to do so for testing purposes.
108 NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "", " &\n\t")
112 #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
114 MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t")
116 HTMLOBJS = #$ ExpandGlue("WXHTMLOBJS", "", " &\n\t")
118 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
119 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS)
121 all: $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC
123 $(LIBTARGET) : $(OBJECTS)
125 @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
126 wlib /b /c /n /p=512 $^@ @tmp.lbc
130 # @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
131 # wlib /b /c /n /p=512 $^@ @tmp.lbc
134 clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
144 $_ = $project{"WXMSWOBJS"};
147 $text .= $_ . ': $(';
149 if ( $project{"WXOLEOBJS"} =~ /\b\Q$_\E\b/ ) {
150 $text .= 'OLEDIR)\\';
152 $text .= 'MSWDIR)\\';
155 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
163 $text .= $_ . ".$suffix\n" .
164 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
168 ########################################################
169 # Common objects (always compiled)
172 $_ = $project{"WXCOMMONOBJS"};
177 $text .= ': $(COMMDIR)\\';
179 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
187 $text .= $_ . ".$suffix\n" .
188 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
192 y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
193 *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
195 # *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c
197 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
198 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
200 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
201 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
203 ########################################################
204 # Generic objects (not always compiled, depending on
205 # whether platforms have native implementations)
208 $_ = $project{"WXGENERICOBJS"};
213 $text .= ': $(GENDIR)\\';
214 $text .= $_ . ".cpp\n" .
215 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
220 ########################################################
221 # HTML objects (always compiled)
224 $_ = $project{"WXHTMLOBJS"};
229 $text .= ': $(HTMLDIR)\\';
230 $text .= $_ . ".cpp\n" .
231 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
236 OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
238 OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
239 infutil$(O) inffast$(O)
241 adler32.obj: adler32.c zutil.h zlib.h zconf.h
242 $(CC) -c $(CFLAGS) $*.c
244 compress.obj: compress.c zlib.h zconf.h
245 $(CC) -c $(CFLAGS) $*.c
247 crc32.obj: crc32.c zutil.h zlib.h zconf.h
248 $(CC) -c $(CFLAGS) $*.c
250 deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
251 $(CC) -c $(CFLAGS) $*.c
253 gzio.obj: gzio.c zutil.h zlib.h zconf.h
254 $(CC) -c $(CFLAGS) $*.c
256 infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
258 $(CC) -c $(CFLAGS) $*.c
260 infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
262 $(CC) -c $(CFLAGS) $*.c
264 inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
265 $(CC) -c $(CFLAGS) $*.c
267 inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
268 $(CC) -c $(CFLAGS) $*.c
270 infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
271 $(CC) -c $(CFLAGS) $*.c
273 inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
274 $(CC) -c $(CFLAGS) $*.c
276 trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
277 $(CC) -c $(CFLAGS) $*.c
279 uncompr.obj: uncompr.c zlib.h zconf.h
280 $(CC) -c $(CFLAGS) $*.c
282 zutil.obj: zutil.c zutil.h zlib.h zconf.h
283 $(CC) -c $(CFLAGS) $*.c
287 wmake -f makefile.wat all
292 wmake -f makefile.wat clean
297 wmake -f makefile.wat all
300 clean_zlib: .SYMBOLIC
302 wmake -f makefile.wat clean
307 wmake -f makefile.wat all
310 clean_jpeg: .SYMBOLIC
312 wmake -f makefile.wat clean
317 wmake -f makefile.wat all
320 clean_tiff: .SYMBOLIC
322 wmake -f makefile.wat clean
326 self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t
327 cd $(WXDIR)\distrib\msw\tmake
328 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
329 copy makefile.$(MFTYPE) $(WXDIR)\src\msw