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 #!#############################################################################
10 #! include the code which parses filelist.txt file and initializes
11 #! %wxCommon, %wxGeneric and %wxMSW hashes.
12 IncludeTemplate("filelist.t");
14 #! now transform these hashes into $project tags
15 foreach $file (sort keys %wxCommon) {
16 next if $wxCommon{$file} !~ /\bB\b/;
18 $isCFile = $file =~ /\.c$/;
19 $file =~ s/cp?p?$/obj/;
20 $project{"WXCOMMONOBJS"} .= $file . " ";
21 $project{"WXCOBJS"} .= $file . " " if $isCFile;
24 foreach $file (sort keys %wxMSW) {
25 next if $wxMSW{$file} !~ /\bB\b/;
27 my $isCFile = $file =~ /\.c$/;
28 $file =~ s/cp?p?$/obj/;
29 $project{"WXMSWOBJS"} .= $file . " ";
30 $project{"WXCOBJS"} .= $file . " " if $isCFile;
33 foreach $file (sort keys %wxBase) {
34 my $isCFile = $file =~ /\.c$/;
35 $file =~ s/cp?p?$/obj/;
36 $project{"WXCOMMONOBJS"} .= $file . " ";
37 $project{"WXCOBJS"} .= $file . " " if $isCFile;
41 #! an attempt to embed '#' directly in the string somehow didn't work...
42 #$ $text = chr(35) . '!/binb/wmake.exe';
44 # This file was automatically generated by tmake
45 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WATBASE.T!
47 ##############################################################################
49 # Purpose: Builds wxBase library for Watcom C++ under Win32
50 # Author: Vadim Zeitlin
53 # Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
54 # Licence: wxWindows licence
55 ##############################################################################
59 !include ..\makewat.env
61 LIBTARGET = $(WXDIR)\lib\wx$(TOOLKIT)$(DEBUGSUFFIX)_w.lib
63 EXTRATARGETS = zlib regex
64 EXTRATARGETSCLEAN = clean_zlib clean_regex
65 COMMDIR=$(WXDIR)\src\common
66 MSWDIR=$(WXDIR)\src\msw
70 #$ ExpandGlue("WXCOMMONOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
73 #$ ExpandGlue("WXMSWOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
75 OBJECTS = $(COMMONOBJS) $(MSWOBJS)
77 SETUP_H=$(ARCHINCDIR)\wx\setup.h
79 all: $(SETUP_H) $(OUTPUTDIR) $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC
83 mkdir $(ARCHINCDIR)\wx
88 $(SETUP_H): $(WXDIR)\include\wx\msw\setup.h $(ARCHINCDIR)\wx
89 copy $(WXDIR)\include\wx\msw\setup.h $@
91 LBCFILE=$(OUTPUTDIR)\wx$(TOOLKIT).lbc
92 $(LIBTARGET) : $(OBJECTS)
94 @for %i in ( $(OBJECTS) ) do @%append $(LBCFILE) +%i
95 wlib /q /b /c /n /p=512 $^@ @$(LBCFILE)
98 clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
99 -erase $(OUTPUTDIR)\*.obj
101 -erase $(OUTPUTDIR)\*.pch
102 -erase $(OUTPUTDIR)\*.err
103 -erase $(OUTPUTDIR)\*.lbc
109 $_ = $project{"WXMSWOBJS"};
112 $text .= "\$(OUTPUTDIR)\\" . $_ . ': $(';
114 $text .= 'MSWDIR)\\';
117 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
127 $text .= $_ . ".$suffix\n" .
128 " *\$($cc) \$($flags) \$<" . "\n\n";
132 ########################################################
133 # Common objects (always compiled)
136 $_ = $project{"WXCOMMONOBJS"};
139 $text .= "\$(OUTPUTDIR)\\" . $_;
141 $text .= ': $(COMMDIR)\\';
143 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
153 $text .= $_ . ".$suffix\n" .
154 " *\$($cc) \$($flags) \$<" . "\n\n";
160 wmake -f makefile.wat all
163 clean_zlib: .SYMBOLIC
165 wmake -f makefile.wat clean
169 cd $(WXDIR)\src\regex
170 wmake -f makefile.wat all
173 clean_regex: .SYMBOLIC
174 cd $(WXDIR)\src\regex
175 wmake -f makefile.wat clean
179 self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t
180 cd $(WXDIR)\distrib\msw\tmake
181 perl -S tmake -t $(MFTYPE) wxwin.pro -o makebase.wat
182 copy makebase.wat $(WXDIR)\src\msw