]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/tmake/dos.t
Temporary ugly trick to make release for OpenWatcom possible.
[wxWidgets.git] / distrib / msw / tmake / dos.t
CommitLineData
f2071dda
VZ
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#!#############################################################################
f2071dda
VZ
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/ ) {
f47cd02d 17 #! Need this file too since it has wxGenericPageSetupDialog
f2071dda
VZ
18 next unless $file =~ /^prntdlgg\./;
19 }
20
21 $file =~ s/cp?p?$/obj/;
22 $project{"WXGENERICOBJS"} .= "\$(GENDIR)\\" . $file . " "
23 }
24
87632557
VZ
25 #! because we later search for " <filename> " in this string
26 $project{"WXCOBJS"} = " ";
27
f2071dda
VZ
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
d87a9620 32 $isCFile = $file =~ /\.c$/;
f2071dda 33 $file =~ s/cp?p?$/obj/;
d87a9620 34 $obj = "\$(COMMDIR)\\" . $file . " ";
0e528b99
JS
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;
d87a9620 38 $project{"WXCOBJS"} .= $obj if $isCFile;
f2071dda
VZ
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
87632557 45 $isCFile = $file =~ /\.c$/;
f2071dda 46 $file =~ s/cp?p?$/obj/;
87632557
VZ
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;
f2071dda
VZ
51 }
52#$}
0f04dbf3 53# This file was automatically generated by tmake
f2071dda
VZ
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
f2071dda
VZ
81USE_CTL3D=1
82
83!if "$(MINIMAL_WXWINDOWS_SETUP)" == "1"
84USE_CTL3D=0
f2071dda
VZ
85!endif
86
87PERIPH_LIBS=
88PERIPH_TARGET=
89PERIPH_CLEAN_TARGET=
90
91# !if "$(USE_CTL3D)" == "1"
92# PERIPH_LIBS=d:\msdev\lib\ctl3d32.lib $(PERIPH_LIBS)
93# !endif
94
f2071dda
VZ
95# PNG and Zlib
96PERIPH_TARGET=png zlib $(PERIPH_TARGET)
97PERIPH_CLEAN_TARGET=clean_png clean_zlib $(PERIPH_CLEAN_TARGET)
98
99GENDIR=..\generic
100COMMDIR=..\common
101OLEDIR=.\ole
102MSWDIR=.
103
104GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
105
0e528b99
JS
106# we can't have all objects in one list because the library becomes too big
107COMMONOBJS1 = \
0e528b99
JS
108 #$ ExpandList("WXCOMMONOBJS1");
109
110COMMONOBJS2 = \
111 #$ ExpandList("WXCOMMONOBJS2");
f2071dda 112
87632557
VZ
113# we can't have all objects in one list because the library becomes too big
114MSWOBJS1 = #$ ExpandList("WXMSWOBJS1");
115
116MSWOBJS2 = #$ ExpandList("WXMSWOBJS2");
f2071dda 117
0e528b99 118OBJECTS = $(COMMONOBJS1) $(COMMONOBJS2) $(GENERICOBJS) $(MSWOBJS1) $(MSWOBJS2)
f2071dda
VZ
119
120# Normal, static library
0e528b99 121all: $(DUMMYOBJ) $(WXDIR)\lib\wx1.lib $(WXDIR)\lib\wx2.lib $(WXDIR)\lib\wx3.lib $(WXDIR)\lib\wx4.lib $(WXDIR)\lib\wx5.lib
f2071dda 122
0e528b99 123$(WXDIR)\lib\wx1.lib: $(COMMONOBJS1) $(PERIPH_LIBS)
f2071dda
VZ
124 -erase $(WXDIR)\lib\wx1.lib
125 lib /PAGESIZE:128 @<<
126$(WXDIR)\lib\wx1.lib
127y
0e528b99 128$(COMMONOBJS1) $(PERIPH_LIBS)
f2071dda
VZ
129nul
130;
131<<
132
0e528b99 133$(WXDIR)\lib\wx2.lib: $(COMMONOBJS2)
f2071dda
VZ
134 -erase $(WXDIR)\lib\wx2.lib
135 lib /PAGESIZE:128 @<<
136$(WXDIR)\lib\wx2.lib
137y
0e528b99 138$(COMMONOBJS2)
f2071dda
VZ
139nul
140;
141<<
142
0e528b99 143$(WXDIR)\lib\wx3.lib: $(GENERICOBJS)
f2071dda
VZ
144 -erase $(WXDIR)\lib\wx3.lib
145 lib /PAGESIZE:128 @<<
146$(WXDIR)\lib\wx3.lib
147y
0e528b99 148$(GENERICOBJS)
8fb3a512
JS
149nul
150;
151<<
152
0e528b99 153$(WXDIR)\lib\wx4.lib: $(MSWOBJS1)
8fb3a512
JS
154 -erase $(WXDIR)\lib\wx4.lib
155 lib /PAGESIZE:128 @<<
156$(WXDIR)\lib\wx4.lib
157y
0e528b99
JS
158$(MSWOBJS1)
159nul
160;
161<<
162
163$(WXDIR)\lib\wx5.lib: $(MSWOBJS2)
164 -erase $(WXDIR)\lib\wx5.lib
165 lib /PAGESIZE:128 @<<
166$(WXDIR)\lib\wx5.lib
167y
8fb3a512 168$(MSWOBJS2)
f2071dda
VZ
169nul
170;
171<<
172
173########################################################
174# Windows-specific objects
175
176dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
177 cl @<<
178 cl $(CPPFLAGS) /YcWX/WXPREC.H $(DEBUG_FLAGS) /c /Tp $*.$(SRCSUFF)
179<<
180
181#dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
182# cl $(CPPFLAGS) /YcWX/WXPREC.H $(DEBUG_FLAGS) /c /Tp $*.$(SRCSUFF)
183
184dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
185 cl @<<
186$(CPPFLAGS) /YcWX/WXPREC.H /c /Tp $*.$(SRCSUFF)
187<<
188
189#${
0e528b99 190 $_ = $project{"WXMSWOBJS1"} . $project{"WXMSWOBJS2"} . $project{"WXCOMMONOBJS1"} . $project{"WXCOMMONOBJS2"} . $project{"WXGENERICOBJS"};
f2071dda
VZ
191 my @objs = split;
192 foreach (@objs) {
87632557
VZ
193 if ( $project{"WXCOBJS"} =~ / \Q$_\E / ) {
194 s:\\:/:;
195 $text .= $_ . ': $*.c' . "\n" .
196 ' cl @<<' . "\n" .
197 '$(CPPFLAGS2) /Fo$@ /c /Tc $*.c' . "\n" .
198 "<<\n\n";
199 }
200 else {
201 s:\\:/:;
202 $text .= $_ . ': $*.$(SRCSUFF)' . "\n" .
203 ' cl @<<' . "\n" .
204 '$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)' . "\n" .
205 "<<\n\n";
206 }
f2071dda
VZ
207 }
208#$}
209
f2071dda
VZ
210$(OBJECTS): $(WXDIR)/include/wx/setup.h
211
212# Peripheral components
213
f2071dda
VZ
214zlib:
215 cd $(WXDIR)\src\zlib
216 nmake -f makefile.dos FINAL=$(FINAL)
217 cd $(WXDIR)\src\msw
218
219clean_zlib:
220 cd $(WXDIR)\src\zlib
221 nmake -f makefile.dos clean
222 cd $(WXDIR)\src\msw
223
224png:
225 cd $(WXDIR)\src\png
226 nmake -f makefile.dos FINAL=$(FINAL)
227 cd $(WXDIR)\src\msw
228
229clean_png:
230 cd $(WXDIR)\src\png
231 nmake -f makefile.dos clean
232 cd $(WXDIR)\src\msw
233
234clean: $(PERIPH_CLEAN_TARGET)
235 -erase *.obj
236 -erase ..\lib\*.lib
237 -erase *.pdb
238 -erase *.sbr
239 -erase *.pch
240 cd $(WXDIR)\src\generic
241 -erase *.pdb
242 -erase *.sbr
243 -erase *.obj
244 cd $(WXDIR)\src\common
245 -erase *.pdb
246 -erase *.sbr
247 -erase *.obj
248 cd $(WXDIR)\src\msw\ole
249 -erase *.pdb
250 -erase *.sbr
251 -erase *.obj
252 cd $(WXDIR)\src\msw
253
254cleanall: clean
255
256
9be9b974
RD
257MFTYPE=dos
258makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
259 cd $(WXWIN)\distrib\msw\tmake
260 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
261 copy makefile.$(MFTYPE) $(WXWIN)\src\msw