]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/tmake/dos.t
Watcom makefile fixes
[wxWidgets.git] / distrib / msw / tmake / dos.t
1 #!#############################################################################
2 #! File: dos.t
3 #! Purpose: tmake template file from which makefile.dos is generated by running
4 #! tmake -t dos wxwin.pro -o makefile.dos
5 #! Author: Vadim Zeitlin
6 #! Created: 14.07.99
7 #! Version: $Id$
8 #!#############################################################################
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 if ( $wxGeneric{$file} =~ /\b(PS|G|U)\b/ ) {
18 #! this file for some reason wasn't compiled for VC++ 1.52
19 next unless $file =~ /^prntdlgg\./;
20 }
21
22 $file =~ s/cp?p?$/obj/;
23 $project{"WXGENERICOBJS"} .= "\$(GENDIR)\\" . $file . " "
24 }
25
26 foreach $file (sort keys %wxCommon) {
27 #! socket files don't compile under Win16 currently
28 next if $wxCommon{$file} =~ /\b(32|S)\b/;
29
30 $isCFile = $file =~ /\.c$/;
31 $file =~ s/cp?p?$/obj/;
32 $obj = "\$(COMMDIR)\\" . $file . " ";
33 $project{"WXCOMMONOBJS"} .= $obj;
34 $project{"WXCOBJS"} .= $obj if $isCFile;
35 }
36
37 foreach $file (sort keys %wxMSW) {
38 #! don't take files not appropriate for 16-bit Windows
39 next if $wxMSW{$file} =~ /\b(32|O)\b/;
40
41 $file =~ s/cp?p?$/obj/;
42 $project{"WXMSWOBJS"} .= "\$(MSWDIR)\\" . $file . " "
43 }
44 #$}
45
46 # This file was automatically generated by tmake at #$ Now()
47 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T!
48
49 #
50 # File: makefile.dos
51 # Author: Julian Smart
52 # Created: 1997
53 # Updated:
54 # Copyright:(c) 1997, Julian Smart
55 #
56 # "%W% %G%"
57 #
58 # Makefile : Builds wxWindows library wx.lib for VC++ (16-bit)
59 # Arguments:
60 #
61 # FINAL=1 argument to nmake to build version with no debugging info.
62 #
63 !include <..\makemsc.env>
64
65 LIBTARGET=$(WXLIB)
66 DUMMYOBJ=dummy.obj
67
68 # Please set these according to the settings in wx_setup.h, so we can include
69 # the appropriate libraries in wx.lib
70
71 # This one overrides the others, to be consistent with the settings in wx_setup.h
72 MINIMAL_WXWINDOWS_SETUP=0
73
74 USE_XPM_IN_MSW=0
75 USE_CTL3D=1
76
77 !if "$(MINIMAL_WXWINDOWS_SETUP)" == "1"
78 USE_CTL3D=0
79 USE_XPM_IN_MSW=0
80 !endif
81
82 PERIPH_LIBS=
83 PERIPH_TARGET=
84 PERIPH_CLEAN_TARGET=
85
86 # !if "$(USE_CTL3D)" == "1"
87 # PERIPH_LIBS=d:\msdev\lib\ctl3d32.lib $(PERIPH_LIBS)
88 # !endif
89
90 !if "$(USE_XPM_IN_MSW)" == "1"
91 PERIPH_LIBS=$(WXDIR)\contrib\wxxpm\xpm.lib $(PERIPH_LIBS)
92 PERIPH_TARGET=xpm $(PERIPH_TARGET)
93 PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET)
94 !endif
95
96 # PNG and Zlib
97 PERIPH_TARGET=png zlib $(PERIPH_TARGET)
98 PERIPH_CLEAN_TARGET=clean_png clean_zlib $(PERIPH_CLEAN_TARGET)
99
100 GENDIR=..\generic
101 COMMDIR=..\common
102 OLEDIR=.\ole
103 MSWDIR=.
104
105 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
106
107 COMMONOBJS = \
108 $(COMMDIR)\y_tab.obj \
109 #$ ExpandList("WXCOMMONOBJS");
110
111 MSWOBJS = #$ ExpandList("WXMSWOBJS");
112
113 # TODO: Implement XPM and PNG targets in this makefile!
114 # $(OLEDIR)\xpmhand \
115 # $(OLEDIR)\pnghand \
116
117 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
118
119 # Normal, static library
120 all: $(DUMMYOBJ) $(WXDIR)\lib\wx1.lib $(WXDIR)\lib\wx2.lib $(WXDIR)\lib\wx3.lib $(WXDIR)\lib\wx4.lib
121
122 $(WXDIR)\lib\wx1.lib: $(COMMONOBJS) $(PERIPH_LIBS)
123 -erase $(WXDIR)\lib\wx1.lib
124 lib /PAGESIZE:128 @<<
125 $(WXDIR)\lib\wx1.lib
126 y
127 $(COMMONOBJS) $(PERIPH_LIBS)
128 nul
129 ;
130 <<
131
132 $(WXDIR)\lib\wx2.lib: $(GENERICOBJS)
133 -erase $(WXDIR)\lib\wx2.lib
134 lib /PAGESIZE:128 @<<
135 $(WXDIR)\lib\wx2.lib
136 y
137 $(GENERICOBJS)
138 nul
139 ;
140 <<
141
142 $(WXDIR)\lib\wx3.lib: $(MSWOBJS1)
143 -erase $(WXDIR)\lib\wx3.lib
144 lib /PAGESIZE:128 @<<
145 $(WXDIR)\lib\wx3.lib
146 y
147 $(MSWOBJS1)
148 nul
149 ;
150 <<
151
152 $(WXDIR)\lib\wx4.lib: $(MSWOBJS2)
153 -erase $(WXDIR)\lib\wx4.lib
154 lib /PAGESIZE:128 @<<
155 $(WXDIR)\lib\wx4.lib
156 y
157 $(MSWOBJS2)
158 nul
159 ;
160 <<
161
162 ########################################################
163 # Windows-specific objects
164
165 dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
166 cl @<<
167 cl $(CPPFLAGS) /YcWX/WXPREC.H $(DEBUG_FLAGS) /c /Tp $*.$(SRCSUFF)
168 <<
169
170 #dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
171 # cl $(CPPFLAGS) /YcWX/WXPREC.H $(DEBUG_FLAGS) /c /Tp $*.$(SRCSUFF)
172
173 dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
174 cl @<<
175 $(CPPFLAGS) /YcWX/WXPREC.H /c /Tp $*.$(SRCSUFF)
176 <<
177
178 #${
179 $_ = $project{"WXMSWOBJS"} . $project{"WXCOMMONOBJS"} . $project{"WXGENERICOBJS"};
180 my @objs = split;
181 foreach (@objs) {
182 if ( $project{"WXCOBJS"} =~ /\Q$_/ ) {
183 s:\\:/:;
184 $text .= $_ . ': $*.c' . "\n" .
185 ' cl @<<' . "\n" .
186 '$(CPPFLAGS2) /Fo$@ /c /Tc $*.c' . "\n" .
187 "<<\n\n";
188 }
189 else {
190 s:\\:/:;
191 $text .= $_ . ': $*.$(SRCSUFF)' . "\n" .
192 ' cl @<<' . "\n" .
193 '$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)' . "\n" .
194 "<<\n\n";
195 }
196 }
197 #$}
198
199 $(COMMDIR)/y_tab.obj: $*.c $(COMMDIR)/lex_yy.c
200 cl @<<
201 $(CPPFLAGS2) -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@ /I ..\common /c $*.c
202 <<
203
204 $(COMMDIR)/y_tab.c: $(COMMDIR)/dosyacc.c
205 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
206
207 $(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c
208 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
209
210 $(OBJECTS): $(WXDIR)/include/wx/setup.h
211
212 # Peripheral components
213
214 xpm:
215 cd $(WXDIR)\src\xpm
216 nmake -f makefile.dos FINAL=$(FINAL)
217 cd $(WXDIR)\src\msw
218
219 clean_xpm:
220 cd $(WXDIR)\src\xpm
221 nmake -f makefile.dos clean
222 cd $(WXDIR)\src\msw
223
224 zlib:
225 cd $(WXDIR)\src\zlib
226 nmake -f makefile.dos FINAL=$(FINAL)
227 cd $(WXDIR)\src\msw
228
229 clean_zlib:
230 cd $(WXDIR)\src\zlib
231 nmake -f makefile.dos clean
232 cd $(WXDIR)\src\msw
233
234 png:
235 cd $(WXDIR)\src\png
236 nmake -f makefile.dos FINAL=$(FINAL)
237 cd $(WXDIR)\src\msw
238
239 clean_png:
240 cd $(WXDIR)\src\png
241 nmake -f makefile.dos clean
242 cd $(WXDIR)\src\msw
243
244 clean: $(PERIPH_CLEAN_TARGET)
245 -erase *.obj
246 -erase ..\lib\*.lib
247 -erase *.pdb
248 -erase *.sbr
249 -erase *.pch
250 cd $(WXDIR)\src\generic
251 -erase *.pdb
252 -erase *.sbr
253 -erase *.obj
254 cd $(WXDIR)\src\common
255 -erase *.pdb
256 -erase *.sbr
257 -erase *.obj
258 cd $(WXDIR)\src\msw\ole
259 -erase *.pdb
260 -erase *.sbr
261 -erase *.obj
262 cd $(WXDIR)\src\msw
263
264 cleanall: clean
265
266
267 MFTYPE=dos
268 makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
269 cd $(WXWIN)\distrib\msw\tmake
270 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
271 copy makefile.$(MFTYPE) $(WXWIN)\src\msw