1 #!#############################################################################
3 #! Purpose: tmake template file from which makefile.wat is generated by running
4 #! tmake -t wat wxwin.pro -o makefile.wat
5 #! Author: Vadim Zeitlin
8 #!#############################################################################
11 #! include the code which parses filelist.txt file and initializes
12 #! %wxCommon, %wxGeneric and %wxMSW hashes.
13 IncludeTemplate("filelist.t");
15 #! now transform these hashes into $project tags
16 foreach $file (sort keys %wxGeneric) {
18 if ( $wxGeneric{$file} =~ /\b(PS|G|16|U)\b/ ) {
19 $tag = "WXNONESSENTIALOBJS";
22 $tag = "WXGENERICOBJS";
25 $file =~ s/cp?p?$/obj/;
26 $project{$tag} .= $file . " "
29 foreach $file (sort keys %wxCommon) {
30 #! doesn't compile, apparently
31 next if $file =~ /^imagjpeg\./;
33 $file =~ s/cp?p?$/obj/;
34 $project{"WXCOMMONOBJS"} .= $file . " "
37 foreach $file (sort keys %wxMSW) {
38 #! these files don't compile
39 next if $file =~ /^pnghand\./;
41 next if $wxGeneric{$file} =~ /\b16\b/;
43 $file =~ s/cp?p?$/obj/;
44 $project{"WXMSWOBJS"} .= $file . " "
48 # This file was automatically generated by tmake at #$ Now()
49 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
51 #! an attempt to embed '#' directly in the string somehow didn't work...
52 #$ $text = chr(35) . '!/binb/wmake.exe';
56 # Author: Julian Smart
59 # Makefile : Builds wxWindows library for Watcom C++, WIN32
63 !include $(WXDIR)\src\makewat.env
67 LIBTARGET = $(WXLIB)\wx.lib
69 # ODBCLIB = ..\..\contrib\odbc\odbc32.lib
71 EXTRATARGETS = xpm png zlib
72 EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib
73 GENDIR=$(WXDIR)\src\generic
74 COMMDIR=$(WXDIR)\src\common
75 XPMDIR=$(WXDIR)\src\xpm
77 MSWDIR=$(WXDIR)\src\msw
79 DOCDIR = $(WXDIR)\docs
81 GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "", " &\n\t")
83 # These are generic things that don't need to be compiled on MSW,
84 # but sometimes it's useful to do so for testing purposes.
85 NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "", " &\n\t")
89 #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
91 MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t")
93 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
94 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
96 all: $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS)
98 $(LIBTARGET) : $(OBJECTS)
100 @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
101 wlib /b /c /n /p=512 $^@ @tmp.lbc
105 # @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
106 # wlib /b /c /n /p=512 $^@ @tmp.lbc
109 clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
119 $_ = $project{"WXMSWOBJS"};
122 $text .= $_ . ': $(';
124 if ( $wxMSW{$_} =~ /\bO\b/ ) {
125 $text .= 'OLEDIR)\\';
127 $text .= 'MSWDIR)\\';
129 $text .= $_ . ".cpp\n" .
130 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
134 ########################################################
135 # Common objects (always compiled)
138 $_ = $project{"WXCOMMONOBJS"};
143 $text .= ': $(COMMDIR)\\';
144 $text .= $_ . ".cpp\n" .
145 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
149 y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
150 *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
152 # *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c
154 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
155 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
157 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
158 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
160 ########################################################
161 # Generic objects (not always compiled, depending on
162 # whether platforms have native implementations)
165 $_ = $project{"WXGENERICOBJS"};
170 $text .= ': $(GENDIR)\\';
171 $text .= $_ . ".cpp\n" .
172 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
176 crbuffri.obj: $(XPMDIR)\crbuffri.c
177 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
179 crbuffrp.obj: $(XPMDIR)\crbuffrp.c
180 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
182 crdatfri.obj: $(XPMDIR)\crdatfri.c
183 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
185 crdatfrp.obj: $(XPMDIR)\crdatfrp.c
186 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
188 create.obj: $(XPMDIR)\create.c
189 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
191 crifrbuf.obj: $(XPMDIR)\crifrbuf.c
192 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
194 crifrdat.obj: $(XPMDIR)\crifrdat.c
195 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
197 crpfrbuf.obj: $(XPMDIR)\crpfrbuf.c
198 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
200 crpfrdat.obj: $(XPMDIR)\crpfrdat.c
201 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
203 # TODO: what to do about this clash of filename????
204 #data.obj: $(XPMDIR)\data.c
205 # *$(CC) $(CPPFLAGS) $(IFLAGS) $<
207 hashtab.obj: $(XPMDIR)\hashtab.c
208 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
210 misc.obj: $(XPMDIR)\misc.c
211 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
213 parse.obj: $(XPMDIR)\parse.c
214 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
216 rdftodat.obj: $(XPMDIR)\rdftodat.c
217 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
219 rdftoi.obj: $(XPMDIR)\rdftoi.c
220 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
222 rdftop.obj: $(XPMDIR)\rdftop.c
223 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
225 rgb.obj: $(XPMDIR)\rgb.c
226 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
228 scan.obj: $(XPMDIR)\scan.c
229 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
231 simx.obj: $(XPMDIR)\simx.c
232 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
234 wrffrdat.obj: $(XPMDIR)\wrffrdat.c
235 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
237 wrffri.obj: $(XPMDIR)\wrffri.c
238 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
240 wrffrp.obj: $(XPMDIR)\wrffrp.c
241 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
243 OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
245 OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
246 infutil$(O) inffast$(O)
248 adler32.obj: adler32.c zutil.h zlib.h zconf.h
249 $(CC) -c $(CFLAGS) $*.c
251 compress.obj: compress.c zlib.h zconf.h
252 $(CC) -c $(CFLAGS) $*.c
254 crc32.obj: crc32.c zutil.h zlib.h zconf.h
255 $(CC) -c $(CFLAGS) $*.c
257 deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
258 $(CC) -c $(CFLAGS) $*.c
260 gzio.obj: gzio.c zutil.h zlib.h zconf.h
261 $(CC) -c $(CFLAGS) $*.c
263 infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
265 $(CC) -c $(CFLAGS) $*.c
267 infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
269 $(CC) -c $(CFLAGS) $*.c
271 inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
272 $(CC) -c $(CFLAGS) $*.c
274 inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
275 $(CC) -c $(CFLAGS) $*.c
277 infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
278 $(CC) -c $(CFLAGS) $*.c
280 inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
281 $(CC) -c $(CFLAGS) $*.c
283 trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
284 $(CC) -c $(CFLAGS) $*.c
286 uncompr.obj: uncompr.c zlib.h zconf.h
287 $(CC) -c $(CFLAGS) $*.c
289 zutil.obj: zutil.c zutil.h zlib.h zconf.h
290 $(CC) -c $(CFLAGS) $*.c
294 wmake -f makefile.wat all
299 wmake -f makefile.wat clean
304 wmake -f makefile.wat all
309 wmake -f makefile.wat clean
314 wmake -f makefile.wat all
317 clean_zlib: .SYMBOLIC
319 wmake -f makefile.wat clean
323 makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
324 cd $(WXWIN)\distrib\msw\tmake
325 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
326 copy makefile.$(MFTYPE) $(WXWIN)\src\msw