]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/tmake/dos.t
added a simple makefile to regenerate all other makefiles with tmake
[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#!#############################################################################
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
62LIBTARGET=$(WXLIB)
63DUMMYOBJ=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
69MINIMAL_WXWINDOWS_SETUP=0
70
71USE_XPM_IN_MSW=0
72USE_CTL3D=1
73
74!if "$(MINIMAL_WXWINDOWS_SETUP)" == "1"
75USE_CTL3D=0
76USE_XPM_IN_MSW=0
77!endif
78
79PERIPH_LIBS=
80PERIPH_TARGET=
81PERIPH_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"
88PERIPH_LIBS=$(WXDIR)\contrib\wxxpm\xpm.lib $(PERIPH_LIBS)
89PERIPH_TARGET=xpm $(PERIPH_TARGET)
90PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET)
91!endif
92
93# PNG and Zlib
94PERIPH_TARGET=png zlib $(PERIPH_TARGET)
95PERIPH_CLEAN_TARGET=clean_png clean_zlib $(PERIPH_CLEAN_TARGET)
96
97GENDIR=..\generic
98COMMDIR=..\common
99OLEDIR=.\ole
100MSWDIR=.
101
102GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
103
104COMMONOBJS = \
105 $(COMMDIR)\y_tab.obj \
106 #$ ExpandList("WXCOMMONOBJS");
107
108MSWOBJS = #$ ExpandList("WXMSWOBJS");
109
110# TODO: Implement XPM and PNG targets in this makefile!
111# $(OLEDIR)\xpmhand \
112# $(OLEDIR)\pnghand \
113
114OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
115
116# Normal, static library
117all: $(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
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
150$(WXDIR)\lib\wx3.lib: $(MSWOBJS)
151 -erase $(WXDIR)\lib\wx3.lib
152 lib /PAGESIZE:128 @<<
153$(WXDIR)\lib\wx3.lib
154y
155$(MSWOBJS)
156nul
157;
158<<
159
160########################################################
161# Windows-specific objects
162
163dummy.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
171dummydll.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$(OBJECTS): $(WXDIR)/include/wx/setup.h
200
201# Peripheral components
202
203xpm:
204 cd $(WXDIR)\src\xpm
205 nmake -f makefile.dos FINAL=$(FINAL)
206 cd $(WXDIR)\src\msw
207
208clean_xpm:
209 cd $(WXDIR)\src\xpm
210 nmake -f makefile.dos clean
211 cd $(WXDIR)\src\msw
212
213zlib:
214 cd $(WXDIR)\src\zlib
215 nmake -f makefile.dos FINAL=$(FINAL)
216 cd $(WXDIR)\src\msw
217
218clean_zlib:
219 cd $(WXDIR)\src\zlib
220 nmake -f makefile.dos clean
221 cd $(WXDIR)\src\msw
222
223png:
224 cd $(WXDIR)\src\png
225 nmake -f makefile.dos FINAL=$(FINAL)
226 cd $(WXDIR)\src\msw
227
228clean_png:
229 cd $(WXDIR)\src\png
230 nmake -f makefile.dos clean
231 cd $(WXDIR)\src\msw
232
233clean: $(PERIPH_CLEAN_TARGET)
234 -erase *.obj
235 -erase ..\lib\*.lib
236 -erase *.pdb
237 -erase *.sbr
238 -erase *.pch
239 cd $(WXDIR)\src\generic
240 -erase *.pdb
241 -erase *.sbr
242 -erase *.obj
243 cd $(WXDIR)\src\common
244 -erase *.pdb
245 -erase *.sbr
246 -erase *.obj
247 cd $(WXDIR)\src\msw\ole
248 -erase *.pdb
249 -erase *.sbr
250 -erase *.obj
251 cd $(WXDIR)\src\msw
252
253cleanall: clean
254
255
9be9b974
RD
256MFTYPE=dos
257makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
258 cd $(WXWIN)\distrib\msw\tmake
259 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
260 copy makefile.$(MFTYPE) $(WXWIN)\src\msw