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