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