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 #! doesn't compile, apparently
34 next if $file =~ /^imagjpeg\./;
36 $isCFile = $file =~ /\.c$/;
37 $file =~ s/cp?p?$/obj/;
38 $project{"WXCOMMONOBJS"} .= $file . " ";
39 $project{"WXCOBJS"} .= $file . " " if $isCFile;
42 foreach $file (sort keys %wxMSW) {
43 #! these files don't compile
44 next if $file =~ /^pnghand\./;
46 #! next if $wxGeneric{$file} =~ /\b16\b/;
48 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
49 my $isCFile = $file =~ /\.c$/;
50 $file =~ s/cp?p?$/obj/;
51 $project{"WXMSWOBJS"} .= $file . " ";
52 $project{"WXCOBJS"} .= $file . " " if $isCFile;
53 $project{"WXOLEOBJS"} .= $file . " " if $isOleObj
56 #! an attempt to embed '#' directly in the string somehow didn't work...
57 #$ $text = chr(35) . '!/binb/wmake.exe';
59 # This file was automatically generated by tmake at #$ Now()
60 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
64 # Author: Julian Smart
67 # Makefile : Builds wxWindows library for Watcom C++, WIN32
69 # NOTE: This file is generated from wat.t by tmake, but not all bugs have
70 # been removed from this process. If wxWindows doesn't compile,
71 # check the following and edit this makefile accordingly:
73 # - OLE-related files such as oleutils.cpp should have 'ole\' prepended
75 # - extended.c, gsocket.c, unzip.c must be compiled using $(CC), not $(CCC).
76 # They may also be wrongly specified as extended.cpp, etc.
80 !include $(WXDIR)\src\makewat.env
84 LIBTARGET = $(WXLIB)\wx.lib
86 # ODBCLIB = ..\..\contrib\odbc\odbc32.lib
88 EXTRATARGETS = xpm png zlib
89 EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib
90 GENDIR=$(WXDIR)\src\generic
91 COMMDIR=$(WXDIR)\src\common
92 XPMDIR=$(WXDIR)\src\xpm
93 MSWDIR=$(WXDIR)\src\msw
96 DOCDIR = $(WXDIR)\docs
98 GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "", " &\n\t")
100 # These are generic things that don't need to be compiled on MSW,
101 # but sometimes it's useful to do so for testing purposes.
102 NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "", " &\n\t")
106 #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
108 MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t")
110 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
111 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
113 all: $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS)
115 $(LIBTARGET) : $(OBJECTS)
117 @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
118 wlib /b /c /n /p=512 $^@ @tmp.lbc
122 # @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
123 # wlib /b /c /n /p=512 $^@ @tmp.lbc
126 clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
136 $_ = $project{"WXMSWOBJS"};
139 $text .= $_ . ': $(';
141 if ( $project{"WXOLEOBJS"} =~ /\b\Q$_\E\b/ ) {
142 $text .= 'OLEDIR)\\';
144 $text .= 'MSWDIR)\\';
147 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
155 $text .= $_ . ".$suffix\n" .
156 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
160 ########################################################
161 # Common objects (always compiled)
164 $_ = $project{"WXCOMMONOBJS"};
169 $text .= ': $(COMMDIR)\\';
171 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
179 $text .= $_ . ".$suffix\n" .
180 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
184 y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
185 *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
187 # *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c
189 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
190 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
192 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
193 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
195 ########################################################
196 # Generic objects (not always compiled, depending on
197 # whether platforms have native implementations)
200 $_ = $project{"WXGENERICOBJS"};
205 $text .= ': $(GENDIR)\\';
206 $text .= $_ . ".cpp\n" .
207 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
211 crbuffri.obj: $(XPMDIR)\crbuffri.c
212 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
214 crbuffrp.obj: $(XPMDIR)\crbuffrp.c
215 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
217 crdatfri.obj: $(XPMDIR)\crdatfri.c
218 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
220 crdatfrp.obj: $(XPMDIR)\crdatfrp.c
221 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
223 create.obj: $(XPMDIR)\create.c
224 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
226 crifrbuf.obj: $(XPMDIR)\crifrbuf.c
227 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
229 crifrdat.obj: $(XPMDIR)\crifrdat.c
230 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
232 crpfrbuf.obj: $(XPMDIR)\crpfrbuf.c
233 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
235 crpfrdat.obj: $(XPMDIR)\crpfrdat.c
236 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
238 # TODO: what to do about this clash of filename????
239 #data.obj: $(XPMDIR)\data.c
240 # *$(CC) $(CPPFLAGS) $(IFLAGS) $<
242 hashtab.obj: $(XPMDIR)\hashtab.c
243 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
245 misc.obj: $(XPMDIR)\misc.c
246 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
248 parse.obj: $(XPMDIR)\parse.c
249 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
251 rdftodat.obj: $(XPMDIR)\rdftodat.c
252 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
254 rdftoi.obj: $(XPMDIR)\rdftoi.c
255 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
257 rdftop.obj: $(XPMDIR)\rdftop.c
258 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
260 rgb.obj: $(XPMDIR)\rgb.c
261 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
263 scan.obj: $(XPMDIR)\scan.c
264 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
266 simx.obj: $(XPMDIR)\simx.c
267 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
269 wrffrdat.obj: $(XPMDIR)\wrffrdat.c
270 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
272 wrffri.obj: $(XPMDIR)\wrffri.c
273 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
275 wrffrp.obj: $(XPMDIR)\wrffrp.c
276 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
278 OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
280 OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
281 infutil$(O) inffast$(O)
283 adler32.obj: adler32.c zutil.h zlib.h zconf.h
284 $(CC) -c $(CFLAGS) $*.c
286 compress.obj: compress.c zlib.h zconf.h
287 $(CC) -c $(CFLAGS) $*.c
289 crc32.obj: crc32.c zutil.h zlib.h zconf.h
290 $(CC) -c $(CFLAGS) $*.c
292 deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
293 $(CC) -c $(CFLAGS) $*.c
295 gzio.obj: gzio.c zutil.h zlib.h zconf.h
296 $(CC) -c $(CFLAGS) $*.c
298 infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
300 $(CC) -c $(CFLAGS) $*.c
302 infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
304 $(CC) -c $(CFLAGS) $*.c
306 inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
307 $(CC) -c $(CFLAGS) $*.c
309 inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
310 $(CC) -c $(CFLAGS) $*.c
312 infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
313 $(CC) -c $(CFLAGS) $*.c
315 inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
316 $(CC) -c $(CFLAGS) $*.c
318 trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
319 $(CC) -c $(CFLAGS) $*.c
321 uncompr.obj: uncompr.c zlib.h zconf.h
322 $(CC) -c $(CFLAGS) $*.c
324 zutil.obj: zutil.c zutil.h zlib.h zconf.h
325 $(CC) -c $(CFLAGS) $*.c
329 wmake -f makefile.wat all
334 wmake -f makefile.wat clean
339 wmake -f makefile.wat all
344 wmake -f makefile.wat clean
349 wmake -f makefile.wat all
352 clean_zlib: .SYMBOLIC
354 wmake -f makefile.wat clean
358 makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
359 cd $(WXWIN)\distrib\msw\tmake
360 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
361 copy makefile.$(MFTYPE) $(WXWIN)\src\msw