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) {
20 next if $wxGeneric{$file} =~ /\bNotMGL\b/;
22 $file =~ s/cp?p?$/obj/;
23 $project{"WXGENERICOBJS"} .= $file . " "
26 foreach $file (sort keys %wxHTML) {
27 next if $wxHTML{$file} =~ /\b16\b/;
29 $file =~ s/cp?p?$/obj/;
30 $project{"WXHTMLOBJS"} .= $file . " "
33 foreach $file (sort keys %wxCommon) {
34 next if $wxCommon{$file} =~ /\bNotMGL\b/;
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 %wxMGL) {
43 #! these files don't compile
45 $isBmpbase = $file =~ /bmpbase\.cpp$/;
46 $file =~ s/cp?p?$/obj/;
48 $project{"WXCOMMONOBJS"} .= $file . " ";
50 $project{"WXMGLOBJS"} .= $file . " ";
54 foreach $file (sort keys %wxUNIV) {
55 ($fileobj = $file) =~ s/cp?p?$/\o/;
56 my $tag = $wxUNIV{$file} =~ /T/ ? "WXUNIVTHEMEOBJS" : "WXUNIVOBJS";
58 $file =~ s/cp?p?$/obj/;
59 $project{$tag} .= $file . " ";
62 #! an attempt to embed '#' directly in the string somehow didn't work...
63 #$ $text = chr(35) . '!/binb/wmake.exe';
65 # This file was automatically generated by tmake
66 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
70 # Author: Julian Smart & Vaclav Slavik
73 # Makefile : Builds wxWindows library for Watcom C++, DOS+MGL
75 # NOTE: This file is generated from wat.t by tmake, but not all bugs have
76 # been removed from this process. If wxWindows doesn't compile,
77 # check the following and edit this makefile accordingly:
79 # - extended.c, gsocket.c, unzip.c must be compiled using $(CC), not $(CCC).
80 # They may also be wrongly specified as extended.cpp, etc.
88 LIBTARGET = $(WXLIB)\wx.lib
90 # ODBCLIB = ..\..\contrib\odbc\odbc32.lib
92 EXTRATARGETS = png zlib jpeg tiff regex
93 EXTRATARGETSCLEAN = clean_png clean_zlib clean_jpeg clean_tiff clean_regex
94 GENDIR=$(WXDIR)\src\generic
95 COMMDIR=$(WXDIR)\src\common
96 JPEGDIR=$(WXDIR)\src\jpeg
97 TIFFDIR=$(WXDIR)\src\tiff
98 MGLDIR=$(WXDIR)\src\mgl
99 UNIVDIR=$(WXDIR)\src\univ
100 UNIVTHEMEDIR=$(WXDIR)\src\univ\themes
101 HTMLDIR=$(WXDIR)\src\html
103 DOCDIR = $(WXDIR)\docs
105 GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "", " &\n\t")
109 #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
111 MGLOBJS = #$ ExpandGlue("WXMGLOBJS", "", " &\n\t")
113 UNIVOBJS = #$ ExpandGlue("WXUNIVOBJS", "", " &\n\t")
115 UNIVTHEMEOBJS = #$ ExpandGlue("WXUNIVTHEMEOBJS", "", " &\n\t")
117 HTMLOBJS = #$ ExpandGlue("WXHTMLOBJS", "", " &\n\t")
119 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
120 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MGLOBJS) $(UNIVOBJS) $(UNIVTHEMEOBJS) $(HTMLOBJS)
122 SETUP_H=$(ARCHINCDIR)\wx\setup.h
124 all: $(SETUP_H) $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC
128 mkdir $(ARCHINCDIR)\wx
130 $(SETUP_H): $(WXDIR)\include\wx\univ\setup.h $(ARCHINCDIR)\wx
131 copy $(WXDIR)\include\wx\univ\setup.h $@
133 $(LIBTARGET) : $(OBJECTS)
135 @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
136 wlib /b /c /n /p=512 $^@ @tmp.lbc
138 clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
148 $_ = $project{"WXMGLOBJS"};
151 $text .= $_ . ': $(';
153 $text .= 'MGLDIR)\\';
155 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
163 $text .= $_ . ".$suffix\n" .
164 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
168 ########################################################
169 # wxUNIVERSAL objects (always compiled)
172 $_ = $project{"WXUNIVOBJS"};
177 $text .= ': $(UNIVDIR)\\';
178 $text .= $_ . ".cpp\n" .
179 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
184 $_ = $project{"WXUNIVTHEMEOBJS"};
189 $text .= ': $(UNIVTHEMEDIR)\\';
190 $text .= $_ . ".cpp\n" .
191 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
195 ########################################################
196 # Common objects (always compiled)
199 $_ = $project{"WXCOMMONOBJS"};
204 $text .= ': $(COMMDIR)\\';
206 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
214 $text .= $_ . ".$suffix\n" .
215 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
219 y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
220 *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
222 # *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c
224 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
225 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
227 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
228 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
230 ########################################################
231 # Generic objects (not always compiled, depending on
232 # whether platforms have native implementations)
235 $_ = $project{"WXGENERICOBJS"};
240 $text .= ': $(GENDIR)\\';
241 $text .= $_ . ".cpp\n" .
242 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
247 ########################################################
248 # HTML objects (always compiled)
251 $_ = $project{"WXHTMLOBJS"};
256 $text .= ': $(HTMLDIR)\\';
257 $text .= $_ . ".cpp\n" .
258 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
265 wmake -f makefile.wat all
270 wmake -f makefile.wat clean
275 wmake -f makefile.wat all
278 clean_zlib: .SYMBOLIC
280 wmake -f makefile.wat clean
285 wmake -f makefile.wat all
288 clean_jpeg: .SYMBOLIC
290 wmake -f makefile.wat clean
295 wmake -f makefile.wat all
298 clean_tiff: .SYMBOLIC
300 wmake -f makefile.wat clean
304 cd $(WXDIR)\src\regex
305 wmake -f makefile.wat all
308 clean_regex: .SYMBOLIC
309 cd $(WXDIR)\src\regex
310 wmake -f makefile.wat clean
314 self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t
315 cd $(WXDIR)\distrib\msw\tmake
316 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
317 copy makefile.$(MFTYPE) $(WXDIR)\src\mgl