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 #!#############################################################################
15 #! include the code which parses filelist.txt file and initializes
16 #! %wxCommon, %wxGeneric and %wxMSW hashes.
17 IncludeTemplate("filelist.t");
19 #! now transform these hashes into $project tags
20 foreach $file (sort keys %wxGeneric) {
22 if ( $wxGeneric{$file} =~ /\b(PS|G|16|U)\b/ ) {
23 $tag = "WXNONESSENTIALOBJS";
26 $tag = "WXGENERICOBJS";
29 $file =~ s/cp?p?$/obj/;
30 $project{$tag} .= $file . " "
33 foreach $file (sort keys %wxCommon) {
34 #! doesn't compile, apparently
35 next if $file =~ /^imagjpeg\./;
37 $file =~ s/cp?p?$/obj/;
38 $project{"WXCOMMONOBJS"} .= $file . " "
41 foreach $file (sort keys %wxMSW) {
42 #! these files don't compile
43 next if $file =~ /^pnghand\./;
45 next if $wxGeneric{$file} =~ /\b16\b/;
47 $file =~ s/cp?p?$/obj/;
48 $project{"WXMSWOBJS"} .= $file . " "
52 # This file was automatically generated by tmake at #$ Now()
53 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
55 #! an attempt to embed '#' directly in the string somehow didn't work...
56 #$ $text = chr(35) . '!/binb/wmake.exe';
60 # Author: Julian Smart
63 # Makefile : Builds wxWindows library for Watcom C++, WIN32
65 # NOTE: This file is generated from wat.t by tmake, but not all bugs have
66 # been removed from this process. If wxWindows doesn't compile,
67 # check the following and edit this makefile accordingly:
69 # - OLE-related files such as oleutils.cpp should have 'ole\' prepended
71 # - extended.c, gsocket.c, unzip.c must be compiled using $(CC), not $(CCC).
72 # They may also be wrongly specified as extended.cpp, etc.
76 !include $(WXDIR)\src\makewat.env
80 LIBTARGET = $(WXLIB)\wx.lib
82 # ODBCLIB = ..\..\contrib\odbc\odbc32.lib
84 EXTRATARGETS = xpm png zlib
85 EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib
86 GENDIR=$(WXDIR)\src\generic
87 COMMDIR=$(WXDIR)\src\common
88 XPMDIR=$(WXDIR)\src\xpm
90 MSWDIR=$(WXDIR)\src\msw
92 DOCDIR = $(WXDIR)\docs
94 GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "", " &\n\t")
96 # These are generic things that don't need to be compiled on MSW,
97 # but sometimes it's useful to do so for testing purposes.
98 NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "", " &\n\t")
102 #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
104 MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t")
106 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
107 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
109 all: $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS)
111 $(LIBTARGET) : $(OBJECTS)
113 @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
114 wlib /b /c /n /p=512 $^@ @tmp.lbc
118 # @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
119 # wlib /b /c /n /p=512 $^@ @tmp.lbc
122 clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
132 $_ = $project{"WXMSWOBJS"};
135 $text .= $_ . ': $(';
137 if ( $wxMSW{$_} =~ /\bO\b/ ) {
138 $text .= 'OLEDIR)\\';
140 $text .= 'MSWDIR)\\';
142 $text .= $_ . ".cpp\n" .
143 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
147 ########################################################
148 # Common objects (always compiled)
151 $_ = $project{"WXCOMMONOBJS"};
156 $text .= ': $(COMMDIR)\\';
157 $text .= $_ . ".cpp\n" .
158 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
162 y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
163 *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
165 # *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c
167 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
168 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
170 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
171 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
173 ########################################################
174 # Generic objects (not always compiled, depending on
175 # whether platforms have native implementations)
178 $_ = $project{"WXGENERICOBJS"};
183 $text .= ': $(GENDIR)\\';
184 $text .= $_ . ".cpp\n" .
185 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
189 crbuffri.obj: $(XPMDIR)\crbuffri.c
190 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
192 crbuffrp.obj: $(XPMDIR)\crbuffrp.c
193 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
195 crdatfri.obj: $(XPMDIR)\crdatfri.c
196 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
198 crdatfrp.obj: $(XPMDIR)\crdatfrp.c
199 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
201 create.obj: $(XPMDIR)\create.c
202 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
204 crifrbuf.obj: $(XPMDIR)\crifrbuf.c
205 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
207 crifrdat.obj: $(XPMDIR)\crifrdat.c
208 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
210 crpfrbuf.obj: $(XPMDIR)\crpfrbuf.c
211 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
213 crpfrdat.obj: $(XPMDIR)\crpfrdat.c
214 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
216 # TODO: what to do about this clash of filename????
217 #data.obj: $(XPMDIR)\data.c
218 # *$(CC) $(CPPFLAGS) $(IFLAGS) $<
220 hashtab.obj: $(XPMDIR)\hashtab.c
221 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
223 misc.obj: $(XPMDIR)\misc.c
224 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
226 parse.obj: $(XPMDIR)\parse.c
227 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
229 rdftodat.obj: $(XPMDIR)\rdftodat.c
230 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
232 rdftoi.obj: $(XPMDIR)\rdftoi.c
233 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
235 rdftop.obj: $(XPMDIR)\rdftop.c
236 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
238 rgb.obj: $(XPMDIR)\rgb.c
239 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
241 scan.obj: $(XPMDIR)\scan.c
242 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
244 simx.obj: $(XPMDIR)\simx.c
245 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
247 wrffrdat.obj: $(XPMDIR)\wrffrdat.c
248 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
250 wrffri.obj: $(XPMDIR)\wrffri.c
251 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
253 wrffrp.obj: $(XPMDIR)\wrffrp.c
254 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
256 OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
258 OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
259 infutil$(O) inffast$(O)
261 adler32.obj: adler32.c zutil.h zlib.h zconf.h
262 $(CC) -c $(CFLAGS) $*.c
264 compress.obj: compress.c zlib.h zconf.h
265 $(CC) -c $(CFLAGS) $*.c
267 crc32.obj: crc32.c zutil.h zlib.h zconf.h
268 $(CC) -c $(CFLAGS) $*.c
270 deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
271 $(CC) -c $(CFLAGS) $*.c
273 gzio.obj: gzio.c zutil.h zlib.h zconf.h
274 $(CC) -c $(CFLAGS) $*.c
276 infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
278 $(CC) -c $(CFLAGS) $*.c
280 infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
282 $(CC) -c $(CFLAGS) $*.c
284 inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
285 $(CC) -c $(CFLAGS) $*.c
287 inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
288 $(CC) -c $(CFLAGS) $*.c
290 infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
291 $(CC) -c $(CFLAGS) $*.c
293 inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
294 $(CC) -c $(CFLAGS) $*.c
296 trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
297 $(CC) -c $(CFLAGS) $*.c
299 uncompr.obj: uncompr.c zlib.h zconf.h
300 $(CC) -c $(CFLAGS) $*.c
302 zutil.obj: zutil.c zutil.h zlib.h zconf.h
303 $(CC) -c $(CFLAGS) $*.c
307 wmake -f makefile.wat all
312 wmake -f makefile.wat clean
317 wmake -f makefile.wat all
322 wmake -f makefile.wat clean
327 wmake -f makefile.wat all
330 clean_zlib: .SYMBOLIC
332 wmake -f makefile.wat clean
336 makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
337 cd $(WXWIN)\distrib\msw\tmake
338 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
339 copy makefile.$(MFTYPE) $(WXWIN)\src\msw