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 %wxHTML) {
33 next if $wxHTML{$file} =~ /\b16\b/;
35 $file =~ s/cp?p?$/obj/;
36 $project{"WXHTMLOBJS"} .= $file . " "
39 foreach $file (sort keys %wxCommon) {
40 next if $wxCommon{$file} =~ /\b(16|U)\b/;
42 $isCFile = $file =~ /\.c$/;
43 $file =~ s/cp?p?$/obj/;
44 $project{"WXCOMMONOBJS"} .= $file . " ";
45 $project{"WXCOBJS"} .= $file . " " if $isCFile;
48 foreach $file (sort keys %wxMSW) {
49 #! these files don't compile
50 next if $file =~ /^pnghand\./;
52 #! next if $wxGeneric{$file} =~ /\b16\b/;
54 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
55 my $isCFile = $file =~ /\.c$/;
56 $file =~ s/cp?p?$/obj/;
57 $project{"WXMSWOBJS"} .= $file . " ";
58 $project{"WXCOBJS"} .= $file . " " if $isCFile;
59 $project{"WXOLEOBJS"} .= $file . " " if $isOleObj
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
73 # Makefile : Builds wxWindows library for Watcom C++, WIN32
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 # - OLE-related files such as oleutils.cpp should have 'ole\' prepended
81 # - extended.c, gsocket.c, unzip.c must be compiled using $(CC), not $(CCC).
82 # They may also be wrongly specified as extended.cpp, etc.
86 !include $(WXDIR)\src\makewat.env
90 LIBTARGET = $(WXLIB)\wx.lib
92 # ODBCLIB = ..\..\contrib\odbc\odbc32.lib
94 EXTRATARGETS = png zlib jpeg tiff regex
95 EXTRATARGETSCLEAN = clean_png clean_zlib clean_jpeg clean_tiff clean_regex
96 GENDIR=$(WXDIR)\src\generic
97 COMMDIR=$(WXDIR)\src\common
98 JPEGDIR=$(WXDIR)\src\jpeg
99 TIFFDIR=$(WXDIR)\src\tiff
100 MSWDIR=$(WXDIR)\src\msw
102 HTMLDIR=$(WXDIR)\src\html
104 DOCDIR = $(WXDIR)\docs
106 GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "", " &\n\t")
108 # These are generic things that don't need to be compiled on MSW,
109 # but sometimes it's useful to do so for testing purposes.
110 NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "", " &\n\t")
114 #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
116 MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t")
118 HTMLOBJS = #$ ExpandGlue("WXHTMLOBJS", "", " &\n\t")
120 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
121 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS)
123 ARCHINCDIR=$(WXDIR)\lib\msw
124 SETUP_H=$(ARCHINCDIR)\wx\setup.h
126 all: $(SETUP_H) $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC
130 mkdir $(ARCHINCDIR)\wx
132 $(SETUP_H): $(WXDIR)\include\wx\msw\setup.h $(ARCHINCDIR)\wx
133 copy $(WXDIR)\include\wx\msw\setup.h $@
135 $(LIBTARGET) : $(OBJECTS)
137 @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
138 wlib /b /c /n /p=512 $^@ @tmp.lbc
142 # @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
143 # wlib /b /c /n /p=512 $^@ @tmp.lbc
146 clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
156 $_ = $project{"WXMSWOBJS"};
159 $text .= $_ . ': $(';
161 if ( $project{"WXOLEOBJS"} =~ /\b\Q$_\E\b/ ) {
162 $text .= 'OLEDIR)\\';
164 $text .= 'MSWDIR)\\';
167 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
175 $text .= $_ . ".$suffix\n" .
176 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
180 ########################################################
181 # Common objects (always compiled)
184 $_ = $project{"WXCOMMONOBJS"};
189 $text .= ': $(COMMDIR)\\';
191 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
199 $text .= $_ . ".$suffix\n" .
200 " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
204 y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
205 *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
207 # *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c
209 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
210 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
212 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
213 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
215 ########################################################
216 # Generic objects (not always compiled, depending on
217 # whether platforms have native implementations)
220 $_ = $project{"WXGENERICOBJS"};
225 $text .= ': $(GENDIR)\\';
226 $text .= $_ . ".cpp\n" .
227 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
232 ########################################################
233 # HTML objects (always compiled)
236 $_ = $project{"WXHTMLOBJS"};
241 $text .= ': $(HTMLDIR)\\';
242 $text .= $_ . ".cpp\n" .
243 ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
249 wmake -f makefile.wat all
254 wmake -f makefile.wat clean
259 wmake -f makefile.wat all
262 clean_zlib: .SYMBOLIC
264 wmake -f makefile.wat clean
269 wmake -f makefile.wat all
272 clean_jpeg: .SYMBOLIC
274 wmake -f makefile.wat clean
279 wmake -f makefile.wat all
282 clean_tiff: .SYMBOLIC
284 wmake -f makefile.wat clean
288 cd $(WXDIR)\src\regex
289 wmake -f makefile.wat all
292 clean_regex: .SYMBOLIC
293 cd $(WXDIR)\src\regex
294 wmake -f makefile.wat clean
298 self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t
299 cd $(WXDIR)\distrib\msw\tmake
300 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
301 copy makefile.$(MFTYPE) $(WXDIR)\src\msw