]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/tmake/dos.t
Misc. 16-bit compilation 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 was 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 $file =~ s/cp?p?$/obj/;
31 $project{"WXCOMMONOBJS"} .= "\$(COMMDIR)\\" . $file . " "
32 }
33
34 foreach $file (sort keys %wxMSW) {
35 #! don't take files not appropriate for 16-bit Windows
36 next if $wxMSW{$file} =~ /\b(32|O)\b/;
37
38 $file =~ s/cp?p?$/obj/;
39 $project{"WXMSWOBJS"} .= "\$(MSWDIR)\\" . $file . " "
40 }
41 #$}
42
43 # This file was automatically generated by tmake at #$ Now()
44 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T!
45
46 #
47 # File: makefile.dos
48 # Author: Julian Smart
49 # Created: 1997
50 # Updated:
51 # Copyright:(c) 1997, Julian Smart
52 #
53 # "%W% %G%"
54 #
55 # Makefile : Builds wxWindows library wx.lib for VC++ (16-bit)
56 # Arguments:
57 #
58 # FINAL=1 argument to nmake to build version with no debugging info.
59 #
60 !include <..\makemsc.env>
61
62 LIBTARGET=$(WXLIB)
63 DUMMYOBJ=dummy.obj
64
65 # Please set these according to the settings in wx_setup.h, so we can include
66 # the appropriate libraries in wx.lib
67
68 # This one overrides the others, to be consistent with the settings in wx_setup.h
69 MINIMAL_WXWINDOWS_SETUP=0
70
71 USE_XPM_IN_MSW=0
72 USE_CTL3D=1
73
74 !if "$(MINIMAL_WXWINDOWS_SETUP)" == "1"
75 USE_CTL3D=0
76 USE_XPM_IN_MSW=0
77 !endif
78
79 PERIPH_LIBS=
80 PERIPH_TARGET=
81 PERIPH_CLEAN_TARGET=
82
83 # !if "$(USE_CTL3D)" == "1"
84 # PERIPH_LIBS=d:\msdev\lib\ctl3d32.lib $(PERIPH_LIBS)
85 # !endif
86
87 !if "$(USE_XPM_IN_MSW)" == "1"
88 PERIPH_LIBS=$(WXDIR)\contrib\wxxpm\xpm.lib $(PERIPH_LIBS)
89 PERIPH_TARGET=xpm $(PERIPH_TARGET)
90 PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET)
91 !endif
92
93 # PNG and Zlib
94 PERIPH_TARGET=png zlib $(PERIPH_TARGET)
95 PERIPH_CLEAN_TARGET=clean_png clean_zlib $(PERIPH_CLEAN_TARGET)
96
97 GENDIR=..\generic
98 COMMDIR=..\common
99 OLEDIR=.\ole
100 MSWDIR=.
101
102 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
103
104 COMMONOBJS = \
105 $(COMMDIR)\y_tab.obj \
106 #$ ExpandList("WXCOMMONOBJS");
107
108 MSWOBJS = #$ ExpandList("WXMSWOBJS");
109
110 # TODO: Implement XPM and PNG targets in this makefile!
111 # $(OLEDIR)\xpmhand \
112 # $(OLEDIR)\pnghand \
113
114 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
115
116 # Normal, static library
117 all: $(DUMMYOBJ) $(WXDIR)\lib\wx1.lib $(WXDIR)\lib\wx2.lib $(WXDIR)\lib\wx3.lib
118
119
120 # $(WXDIR)\lib\wx.lib: dummy.obj $(OBJECTS) $(PERIPH_LIBS)
121 # -erase $(LIBTARGET)
122 # lib /PAGESIZE:128 @<<
123 # $(LIBTARGET)
124 # y
125 # $(OBJECTS) $(PERIPH_LIBS)
126 # nul
127 # ;
128 # <<
129
130 $(WXDIR)\lib\wx1.lib: $(COMMONOBJS) $(PERIPH_LIBS)
131 -erase $(WXDIR)\lib\wx1.lib
132 lib /PAGESIZE:128 @<<
133 $(WXDIR)\lib\wx1.lib
134 y
135 $(COMMONOBJS) $(PERIPH_LIBS)
136 nul
137 ;
138 <<
139
140 $(WXDIR)\lib\wx2.lib: $(GENERICOBJS)
141 -erase $(WXDIR)\lib\wx2.lib
142 lib /PAGESIZE:128 @<<
143 $(WXDIR)\lib\wx2.lib
144 y
145 $(GENERICOBJS)
146 nul
147 ;
148 <<
149
150 $(WXDIR)\lib\wx3.lib: $(MSWOBJS)
151 -erase $(WXDIR)\lib\wx3.lib
152 lib /PAGESIZE:128 @<<
153 $(WXDIR)\lib\wx3.lib
154 y
155 $(MSWOBJS)
156 nul
157 ;
158 <<
159
160 ########################################################
161 # Windows-specific objects
162
163 dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
164 cl @<<
165 cl $(CPPFLAGS) /YcWX/WXPREC.H $(DEBUG_FLAGS) /c /Tp $*.$(SRCSUFF)
166 <<
167
168 #dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
169 # cl $(CPPFLAGS) /YcWX/WXPREC.H $(DEBUG_FLAGS) /c /Tp $*.$(SRCSUFF)
170
171 dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
172 cl @<<
173 $(CPPFLAGS) /YcWX/WXPREC.H /c /Tp $*.$(SRCSUFF)
174 <<
175
176 #${
177 $_ = $project{"WXMSWOBJS"} . $project{"WXCOMMONOBJS"} . $project{"WXGENERICOBJS"};
178 my @objs = split;
179 foreach (@objs) {
180 s:\\:/:;
181 $text .= $_ . ': $*.$(SRCSUFF)' . "\n" .
182 ' cl @<<' . "\n" .
183 '$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)' . "\n" .
184 "<<\n\n";
185 }
186 #$}
187
188 $(COMMDIR)/y_tab.obj: $*.c $(COMMDIR)/lex_yy.c
189 cl @<<
190 $(CPPFLAGS2) -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@ /I ..\common /c $*.c
191 <<
192
193 $(COMMDIR)/y_tab.c: $(COMMDIR)/dosyacc.c
194 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
195
196 $(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c
197 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
198
199 $(COMMDIR)/extended.obj: $*.c
200 cl @<<
201 $(CPPFLAGS2) /Fo$@ /c /Tc $*.c
202 <<
203
204 $(COMMDIR)/unzip.obj: $*.c
205 cl @<<
206 $(CPPFLAGS2) /Fo$@ /c /Tc $*.c
207 <<
208
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