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
67 !include $(WXDIR)\src\makewat.env
71 LIBTARGET = $(WXLIB)\wx.lib
73 # ODBCLIB = ..\..\contrib\odbc\odbc32.lib
75 EXTRATARGETS = xpm png zlib
76 EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib
77 GENDIR=$(WXDIR)\src\generic
78 COMMDIR=$(WXDIR)\src\common
79 XPMDIR=$(WXDIR)\src\xpm
81 MSWDIR=$(WXDIR)\src\msw
83 DOCDIR = $(WXDIR)\docs
85 GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "", " &\n\t")
87 # These are generic things that don't need to be compiled on MSW,
88 # but sometimes it's useful to do so for testing purposes.
89 NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "", " &\n\t")
93 #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
95 MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t")
97 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
98 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
100 all: $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS)
102 $(LIBTARGET) : $(OBJECTS)
104 @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
105 wlib /b /c /n /p=512 $^@ @tmp.lbc
109 # @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
110 # wlib /b /c /n /p=512 $^@ @tmp.lbc
113 clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
123 $_ = $project{"WXMSWOBJS"};
126 $text .= $_ . ': $(';
128 if ( $wxMSW{$_} =~ /\bO\b/ ) {
129 $text .= 'OLEDIR)\\';
131 $text .= 'MSWDIR)\\';
133 $text .= $_ . ".cpp\n" .
134 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
138 ########################################################
139 # Common objects (always compiled)
142 $_ = $project{"WXCOMMONOBJS"};
147 $text .= ': $(COMMDIR)\\';
148 $text .= $_ . ".cpp\n" .
149 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
153 y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
154 *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
156 # *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c
158 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
159 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
161 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
162 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
164 ########################################################
165 # Generic objects (not always compiled, depending on
166 # whether platforms have native implementations)
169 $_ = $project{"WXGENERICOBJS"};
174 $text .= ': $(GENDIR)\\';
175 $text .= $_ . ".cpp\n" .
176 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
180 crbuffri.obj: $(XPMDIR)\crbuffri.c
181 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
183 crbuffrp.obj: $(XPMDIR)\crbuffrp.c
184 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
186 crdatfri.obj: $(XPMDIR)\crdatfri.c
187 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
189 crdatfrp.obj: $(XPMDIR)\crdatfrp.c
190 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
192 create.obj: $(XPMDIR)\create.c
193 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
195 crifrbuf.obj: $(XPMDIR)\crifrbuf.c
196 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
198 crifrdat.obj: $(XPMDIR)\crifrdat.c
199 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
201 crpfrbuf.obj: $(XPMDIR)\crpfrbuf.c
202 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
204 crpfrdat.obj: $(XPMDIR)\crpfrdat.c
205 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
207 # TODO: what to do about this clash of filename????
208 #data.obj: $(XPMDIR)\data.c
209 # *$(CC) $(CPPFLAGS) $(IFLAGS) $<
211 hashtab.obj: $(XPMDIR)\hashtab.c
212 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
214 misc.obj: $(XPMDIR)\misc.c
215 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
217 parse.obj: $(XPMDIR)\parse.c
218 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
220 rdftodat.obj: $(XPMDIR)\rdftodat.c
221 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
223 rdftoi.obj: $(XPMDIR)\rdftoi.c
224 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
226 rdftop.obj: $(XPMDIR)\rdftop.c
227 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
229 rgb.obj: $(XPMDIR)\rgb.c
230 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
232 scan.obj: $(XPMDIR)\scan.c
233 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
235 simx.obj: $(XPMDIR)\simx.c
236 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
238 wrffrdat.obj: $(XPMDIR)\wrffrdat.c
239 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
241 wrffri.obj: $(XPMDIR)\wrffri.c
242 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
244 wrffrp.obj: $(XPMDIR)\wrffrp.c
245 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
247 OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
249 OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
250 infutil$(O) inffast$(O)
252 adler32.obj: adler32.c zutil.h zlib.h zconf.h
253 $(CC) -c $(CFLAGS) $*.c
255 compress.obj: compress.c zlib.h zconf.h
256 $(CC) -c $(CFLAGS) $*.c
258 crc32.obj: crc32.c zutil.h zlib.h zconf.h
259 $(CC) -c $(CFLAGS) $*.c
261 deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
262 $(CC) -c $(CFLAGS) $*.c
264 gzio.obj: gzio.c zutil.h zlib.h zconf.h
265 $(CC) -c $(CFLAGS) $*.c
267 infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
269 $(CC) -c $(CFLAGS) $*.c
271 infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
273 $(CC) -c $(CFLAGS) $*.c
275 inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
276 $(CC) -c $(CFLAGS) $*.c
278 inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
279 $(CC) -c $(CFLAGS) $*.c
281 infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
282 $(CC) -c $(CFLAGS) $*.c
284 inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
285 $(CC) -c $(CFLAGS) $*.c
287 trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
288 $(CC) -c $(CFLAGS) $*.c
290 uncompr.obj: uncompr.c zlib.h zconf.h
291 $(CC) -c $(CFLAGS) $*.c
293 zutil.obj: zutil.c zutil.h zlib.h zconf.h
294 $(CC) -c $(CFLAGS) $*.c
298 wmake -f makefile.wat all
303 wmake -f makefile.wat clean
308 wmake -f makefile.wat all
313 wmake -f makefile.wat clean
318 wmake -f makefile.wat all
321 clean_zlib: .SYMBOLIC
323 wmake -f makefile.wat clean
327 makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
328 cd $(WXWIN)\distrib\msw\tmake
329 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
330 copy makefile.$(MFTYPE) $(WXWIN)\src\msw