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 = 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
94 DOCDIR = $(WXDIR)\docs
96 GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "", " &\n\t")
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")
104 #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
106 MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t")
108 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
109 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
111 all: $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS)
113 $(LIBTARGET) : $(OBJECTS)
115 @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
116 wlib /b /c /n /p=512 $^@ @tmp.lbc
120 # @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
121 # wlib /b /c /n /p=512 $^@ @tmp.lbc
124 clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
134 $_ = $project{"WXMSWOBJS"};
137 $text .= $_ . ': $(';
139 if ( $project{"WXOLEOBJS"} =~ /\b\Q$_\E\b/ ) {
140 $text .= 'OLEDIR)\\';
142 $text .= 'MSWDIR)\\';
145 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
153 $text .= $_ . ".$suffix\n" .
154 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
158 ########################################################
159 # Common objects (always compiled)
162 $_ = $project{"WXCOMMONOBJS"};
167 $text .= ': $(COMMDIR)\\';
169 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
177 $text .= $_ . ".$suffix\n" .
178 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
182 y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
183 *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
185 # *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c
187 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
188 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
190 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
191 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
193 ########################################################
194 # Generic objects (not always compiled, depending on
195 # whether platforms have native implementations)
198 $_ = $project{"WXGENERICOBJS"};
203 $text .= ': $(GENDIR)\\';
204 $text .= $_ . ".cpp\n" .
205 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
209 OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
211 OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
212 infutil$(O) inffast$(O)
214 adler32.obj: adler32.c zutil.h zlib.h zconf.h
215 $(CC) -c $(CFLAGS) $*.c
217 compress.obj: compress.c zlib.h zconf.h
218 $(CC) -c $(CFLAGS) $*.c
220 crc32.obj: crc32.c zutil.h zlib.h zconf.h
221 $(CC) -c $(CFLAGS) $*.c
223 deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
224 $(CC) -c $(CFLAGS) $*.c
226 gzio.obj: gzio.c zutil.h zlib.h zconf.h
227 $(CC) -c $(CFLAGS) $*.c
229 infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
231 $(CC) -c $(CFLAGS) $*.c
233 infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
235 $(CC) -c $(CFLAGS) $*.c
237 inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
238 $(CC) -c $(CFLAGS) $*.c
240 inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
241 $(CC) -c $(CFLAGS) $*.c
243 infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
244 $(CC) -c $(CFLAGS) $*.c
246 inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
247 $(CC) -c $(CFLAGS) $*.c
249 trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
250 $(CC) -c $(CFLAGS) $*.c
252 uncompr.obj: uncompr.c zlib.h zconf.h
253 $(CC) -c $(CFLAGS) $*.c
255 zutil.obj: zutil.c zutil.h zlib.h zconf.h
256 $(CC) -c $(CFLAGS) $*.c
260 wmake -f makefile.wat all
265 wmake -f makefile.wat clean
270 wmake -f makefile.wat all
273 clean_zlib: .SYMBOLIC
275 wmake -f makefile.wat clean
280 wmake -f makefile.wat all
283 clean_jpeg: .SYMBOLIC
285 wmake -f makefile.wat clean
290 wmake -f makefile.wat all
293 clean_tiff: .SYMBOLIC
295 wmake -f makefile.wat clean
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