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} =~ /Theme/ ? "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 at #$ Now()
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 all: $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC
124 $(LIBTARGET) : $(OBJECTS)
126 @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
127 wlib /b /c /n /p=512 $^@ @tmp.lbc
129 clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
139 $_ = $project{"WXMGLOBJS"};
142 $text .= $_ . ': $(';
144 $text .= 'MGLDIR)\\';
146 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
154 $text .= $_ . ".$suffix\n" .
155 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
159 ########################################################
160 # wxUNIVERSAL objects (always compiled)
163 $_ = $project{"WXUNIVOBJS"};
168 $text .= ': $(UNIVDIR)\\';
169 $text .= $_ . ".cpp\n" .
170 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
175 $_ = $project{"WXUNIVTHEMEOBJS"};
180 $text .= ': $(UNIVTHEMEDIR)\\';
181 $text .= $_ . ".cpp\n" .
182 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
186 ########################################################
187 # Common objects (always compiled)
190 $_ = $project{"WXCOMMONOBJS"};
195 $text .= ': $(COMMDIR)\\';
197 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
205 $text .= $_ . ".$suffix\n" .
206 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
210 y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
211 *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
213 # *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c
215 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
216 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
218 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
219 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
221 ########################################################
222 # Generic objects (not always compiled, depending on
223 # whether platforms have native implementations)
226 $_ = $project{"WXGENERICOBJS"};
231 $text .= ': $(GENDIR)\\';
232 $text .= $_ . ".cpp\n" .
233 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
238 ########################################################
239 # HTML objects (always compiled)
242 $_ = $project{"WXHTMLOBJS"};
247 $text .= ': $(HTMLDIR)\\';
248 $text .= $_ . ".cpp\n" .
249 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
256 wmake -f makefile.wat all
261 wmake -f makefile.wat clean
266 wmake -f makefile.wat all
269 clean_zlib: .SYMBOLIC
271 wmake -f makefile.wat clean
276 wmake -f makefile.wat all
279 clean_jpeg: .SYMBOLIC
281 wmake -f makefile.wat clean
286 wmake -f makefile.wat all
289 clean_tiff: .SYMBOLIC
291 wmake -f makefile.wat clean
295 cd $(WXDIR)\src\regex
296 wmake -f makefile.wat all
299 clean_regex: .SYMBOLIC
300 cd $(WXDIR)\src\regex
301 wmake -f makefile.wat clean
305 self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t
306 cd $(WXDIR)\distrib\msw\tmake
307 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
308 copy makefile.$(MFTYPE) $(WXDIR)\src\mgl