]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/tmake/wat.t
Put wxHIDE_READONLY back for compatibility.
[wxWidgets.git] / distrib / msw / tmake / wat.t
1 #!#############################################################################
2 #! File: wat.t
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
6 #! Created: 14.07.99
7 #! Version: $Id$
8 #! Changelist: 2003-02-25 - Juergen Ulbts - update from wxWindows 2.5.x/HEAD branch
9 #!#############################################################################
10 #${
11 #! include the code which parses filelist.txt file and initializes
12 #! %wxCommon, %wxGeneric and %wxMSW hashes.
13 IncludeTemplate("filelist.t");
14
15 #! now transform these hashes into $project tags
16 foreach $file (sort keys %wxGeneric) {
17 my $tag = "";
18 if ( $wxGeneric{$file} =~ /\b(PS|G|16|U)\b/ ) {
19 $tag = "WXNONESSENTIALOBJS";
20 }
21 else {
22 $tag = "WXGENERICOBJS";
23 }
24
25 $file =~ s/cp?p?$/obj/;
26 $project{$tag} .= $file . " "
27 }
28
29 foreach $file (sort keys %wxHTML) {
30 next if $wxHTML{$file} =~ /\b16\b/;
31
32 $file =~ s/cp?p?$/obj/;
33 $project{"WXHTMLOBJS"} .= $file . " "
34 }
35
36 foreach $file (sort keys %wxCommon) {
37 next if $wxCommon{$file} =~ /\b(16|U)\b/;
38
39 $isCFile = $file =~ /\.c$/;
40 $file =~ s/cp?p?$/obj/;
41 $project{"WXCOMMONOBJS"} .= $file . " ";
42 $project{"WXCOBJS"} .= $file . " " if $isCFile;
43 }
44
45 foreach $file (sort keys %wxMSW) {
46 #! these files don't compile
47 next if $file =~ /^pnghand\./;
48
49 next if $wxMSW{$file} =~ /\b16\b/;
50
51 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
52 my $isCFile = $file =~ /\.c$/;
53 $file =~ s/cp?p?$/obj/;
54 $project{"WXMSWOBJS"} .= $file . " ";
55 $project{"WXCOBJS"} .= $file . " " if $isCFile;
56 $project{"WXOLEOBJS"} .= $file . " " if $isOleObj
57 }
58 #$}
59 #! an attempt to embed '#' directly in the string somehow didn't work...
60 #$ $text = chr(35) . '!/binb/wmake.exe';
61
62 # This file was automatically generated by tmake
63 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
64
65 #
66 # File: makefile.wat
67 # Author: Julian Smart
68 # Created: 1998
69 #
70 # Makefile : Builds wxWindows library for Watcom C++, WIN32
71 !include ..\makewat.env
72
73 LIBTARGET = $(WXDIR)\lib\$(LIBNAME).lib
74
75 EXTRATARGETS = png zlib jpeg tiff regex
76 EXTRATARGETSCLEAN = clean_png clean_zlib clean_jpeg clean_tiff clean_regex
77 GENDIR=$(WXDIR)\src\generic
78 COMMDIR=$(WXDIR)\src\common
79 JPEGDIR=$(WXDIR)\src\jpeg
80 TIFFDIR=$(WXDIR)\src\tiff
81 MSWDIR=$(WXDIR)\src\msw
82 OLEDIR=$(MSWDIR)\ole
83 HTMLDIR=$(WXDIR)\src\html
84
85 DOCDIR = $(WXDIR)\docs
86
87 GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
88
89 # These are generic things that don't need to be compiled on MSW,
90 # but sometimes it's useful to do so for testing purposes.
91 NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
92
93 COMMONOBJS = &
94 #$ ExpandGlue("WXCOMMONOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
95
96 MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
97
98 HTMLOBJS = #$ ExpandGlue("WXHTMLOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
99
100 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
101 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS)
102
103 SETUP_H=$(ARCHINCDIR)\wx\setup.h
104
105 all: $(SETUP_H) $(OUTPUTDIR) $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC
106
107 $(ARCHINCDIR)\wx:
108 mkdir $(ARCHINCDIR)
109 mkdir $(ARCHINCDIR)\wx
110
111 $(OUTPUTDIR):
112 @if not exist $^@ mkdir $^@
113
114 $(SETUP_H): $(ARCHINCDIR)\wx
115 if not exist $(WXDIR)\include\wx\msw\setup.h copy $(WXDIR)\include\wx\msw\setup0.h $(WXDIR)\include\wx\msw\setup.h
116 copy $(WXDIR)\include\wx\msw\setup.h $@
117
118 LBCFILE=wx$(TOOLKIT).lbc
119 $(LIBTARGET) : $(OBJECTS)
120 %create $(LBCFILE)
121 @for %i in ( $(OBJECTS) ) do @%append $(LBCFILE) +%i
122 wlib /b /c /n $(LIBPAGESIZE) $^@ @$(LBCFILE)
123
124
125 clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
126 -erase *.obj
127 -erase $(LIBTARGET)
128 -erase *.pch
129 -erase *.err
130 -erase *.lbc
131
132 cleanall: clean
133
134 #${
135 $_ = $project{"WXMSWOBJS"};
136 my @objs = split;
137 foreach (@objs) {
138 $text .= "\$(OUTPUTDIR)\\" . $_ . ': $(';
139 s/\.obj$//;
140 if ( $project{"WXOLEOBJS"} =~ /\b\Q$_\E\b/ ) {
141 $text .= 'OLEDIR)\\';
142 } else {
143 $text .= 'MSWDIR)\\';
144 }
145 my $suffix, $cc;
146 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
147 $suffix = "c";
148 $cc="CC";
149 $flags="CFLAGS";
150 }
151 else {
152 $suffix = "cpp";
153 $cc="CXX";
154 $flags="CXXFLAGS";
155 }
156 $text .= $_ . ".$suffix\n" .
157 " *\$($cc) \$($flags) \$<" . "\n\n";
158 }
159 #$}
160
161 ########################################################
162 # Common objects (always compiled)
163
164 #${
165 $_ = $project{"WXCOMMONOBJS"};
166 my @objs = split;
167 foreach (@objs) {
168 $text .= "\$(OUTPUTDIR)\\" . $_;
169 s/\.obj$//;
170 $text .= ': $(COMMDIR)\\';
171 my $suffix, $cc;
172 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
173 $suffix = "c";
174 $cc="CC";
175 $flags="CFLAGS";
176 }
177 else {
178 $suffix = "cpp";
179 $cc="CXX";
180 $flags="CXXFLAGS";
181 }
182 $text .= $_ . ".$suffix\n" .
183 " *\$($cc) \$($flags) \$<" . "\n\n";
184 }
185 #$}
186
187
188 ########################################################
189 # Generic objects (not always compiled, depending on
190 # whether platforms have native implementations)
191
192 #${
193 $_ = $project{"WXGENERICOBJS"};
194 my @objs = split;
195 foreach (@objs) {
196 $text .= "\$(OUTPUTDIR)\\" . $_;
197 s/\.obj$//;
198 $text .= ': $(GENDIR)\\';
199 $text .= $_ . ".cpp\n" .
200 ' *$(CXX) $(CXXFLAGS) $<' . "\n\n";
201 }
202 #$}
203
204
205 ########################################################
206 # HTML objects (always compiled)
207
208 #${
209 $_ = $project{"WXHTMLOBJS"};
210 my @objs = split;
211 foreach (@objs) {
212 $text .= "\$(OUTPUTDIR)\\" . $_;
213 s/\.obj$//;
214 $text .= ': $(HTMLDIR)\\';
215 $text .= $_ . ".cpp\n" .
216 ' *$(CXX) $(CXXFLAGS) $<' . "\n\n";
217 }
218 #$}
219
220 png: .SYMBOLIC
221 cd $(WXDIR)\src\png
222 wmake -f makefile.wat all
223 cd $(WXDIR)\src\msw
224
225 clean_png: .SYMBOLIC
226 cd $(WXDIR)\src\png
227 wmake -f makefile.wat clean
228 cd $(WXDIR)\src\msw
229
230 zlib: .SYMBOLIC
231 cd $(WXDIR)\src\zlib
232 wmake -f makefile.wat all
233 cd $(WXDIR)\src\msw
234
235 clean_zlib: .SYMBOLIC
236 cd $(WXDIR)\src\zlib
237 wmake -f makefile.wat clean
238 cd $(WXDIR)\src\msw
239
240 jpeg: .SYMBOLIC
241 cd $(WXDIR)\src\jpeg
242 wmake -f makefile.wat all
243 cd $(WXDIR)\src\msw
244
245 clean_jpeg: .SYMBOLIC
246 cd $(WXDIR)\src\jpeg
247 wmake -f makefile.wat clean
248 cd $(WXDIR)\src\msw
249
250 tiff: .SYMBOLIC
251 cd $(WXDIR)\src\tiff
252 wmake -f makefile.wat all
253 cd $(WXDIR)\src\msw
254
255 clean_tiff: .SYMBOLIC
256 cd $(WXDIR)\src\tiff
257 wmake -f makefile.wat clean
258 cd $(WXDIR)\src\msw
259
260 regex: .SYMBOLIC
261 cd $(WXDIR)\src\regex
262 wmake -f makefile.wat all
263 cd $(WXDIR)\src\msw
264
265 clean_regex: .SYMBOLIC
266 cd $(WXDIR)\src\regex
267 wmake -f makefile.wat clean
268 cd $(WXDIR)\src\msw
269
270 MFTYPE=wat
271 self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t
272 cd $(WXDIR)\distrib\msw\tmake
273 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
274 copy makefile.$(MFTYPE) $(WXDIR)\src\msw