]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/tmake/dos.t
added msw/gccpriv.h and others to headers list
[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 #! 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
72 LIBTARGET=$(WXLIB)
73 DUMMYOBJ=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
79 MINIMAL_WXWINDOWS_SETUP=0
80
81 USE_CTL3D=1
82
83 !if "$(MINIMAL_WXWINDOWS_SETUP)" == "1"
84 USE_CTL3D=0
85 !endif
86
87 PERIPH_LIBS=
88 PERIPH_TARGET=
89 PERIPH_CLEAN_TARGET=
90
91 # !if "$(USE_CTL3D)" == "1"
92 # PERIPH_LIBS=d:\msdev\lib\ctl3d32.lib $(PERIPH_LIBS)
93 # !endif
94
95 # PNG and Zlib
96 PERIPH_TARGET=png zlib $(PERIPH_TARGET)
97 PERIPH_CLEAN_TARGET=clean_png clean_zlib $(PERIPH_CLEAN_TARGET)
98
99 GENDIR=..\generic
100 COMMDIR=..\common
101 OLEDIR=.\ole
102 MSWDIR=.
103
104 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
105
106 # we can't have all objects in one list because the library becomes too big
107 COMMONOBJS1 = \
108 $(COMMDIR)\y_tab.obj \
109 #$ ExpandList("WXCOMMONOBJS1");
110
111 COMMONOBJS2 = \
112 #$ ExpandList("WXCOMMONOBJS2");
113
114 # we can't have all objects in one list because the library becomes too big
115 MSWOBJS1 = #$ ExpandList("WXMSWOBJS1");
116
117 MSWOBJS2 = #$ ExpandList("WXMSWOBJS2");
118
119 OBJECTS = $(COMMONOBJS1) $(COMMONOBJS2) $(GENERICOBJS) $(MSWOBJS1) $(MSWOBJS2)
120
121 # Normal, static library
122 all: $(DUMMYOBJ) $(WXDIR)\lib\wx1.lib $(WXDIR)\lib\wx2.lib $(WXDIR)\lib\wx3.lib $(WXDIR)\lib\wx4.lib $(WXDIR)\lib\wx5.lib
123
124 $(WXDIR)\lib\wx1.lib: $(COMMONOBJS1) $(PERIPH_LIBS)
125 -erase $(WXDIR)\lib\wx1.lib
126 lib /PAGESIZE:128 @<<
127 $(WXDIR)\lib\wx1.lib
128 y
129 $(COMMONOBJS1) $(PERIPH_LIBS)
130 nul
131 ;
132 <<
133
134 $(WXDIR)\lib\wx2.lib: $(COMMONOBJS2)
135 -erase $(WXDIR)\lib\wx2.lib
136 lib /PAGESIZE:128 @<<
137 $(WXDIR)\lib\wx2.lib
138 y
139 $(COMMONOBJS2)
140 nul
141 ;
142 <<
143
144 $(WXDIR)\lib\wx3.lib: $(GENERICOBJS)
145 -erase $(WXDIR)\lib\wx3.lib
146 lib /PAGESIZE:128 @<<
147 $(WXDIR)\lib\wx3.lib
148 y
149 $(GENERICOBJS)
150 nul
151 ;
152 <<
153
154 $(WXDIR)\lib\wx4.lib: $(MSWOBJS1)
155 -erase $(WXDIR)\lib\wx4.lib
156 lib /PAGESIZE:128 @<<
157 $(WXDIR)\lib\wx4.lib
158 y
159 $(MSWOBJS1)
160 nul
161 ;
162 <<
163
164 $(WXDIR)\lib\wx5.lib: $(MSWOBJS2)
165 -erase $(WXDIR)\lib\wx5.lib
166 lib /PAGESIZE:128 @<<
167 $(WXDIR)\lib\wx5.lib
168 y
169 $(MSWOBJS2)
170 nul
171 ;
172 <<
173
174 ########################################################
175 # Windows-specific objects
176
177 dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
178 cl @<<
179 cl $(CPPFLAGS) /YcWX/WXPREC.H $(DEBUG_FLAGS) /c /Tp $*.$(SRCSUFF)
180 <<
181
182 #dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
183 # cl $(CPPFLAGS) /YcWX/WXPREC.H $(DEBUG_FLAGS) /c /Tp $*.$(SRCSUFF)
184
185 dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
186 cl @<<
187 $(CPPFLAGS) /YcWX/WXPREC.H /c /Tp $*.$(SRCSUFF)
188 <<
189
190 #${
191 $_ = $project{"WXMSWOBJS1"} . $project{"WXMSWOBJS2"} . $project{"WXCOMMONOBJS1"} . $project{"WXCOMMONOBJS2"} . $project{"WXGENERICOBJS"};
192 my @objs = split;
193 foreach (@objs) {
194 if ( $project{"WXCOBJS"} =~ / \Q$_\E / ) {
195 s:\\:/:;
196 $text .= $_ . ': $*.c' . "\n" .
197 ' cl @<<' . "\n" .
198 '$(CPPFLAGS2) /Fo$@ /c /Tc $*.c' . "\n" .
199 "<<\n\n";
200 }
201 else {
202 s:\\:/:;
203 $text .= $_ . ': $*.$(SRCSUFF)' . "\n" .
204 ' cl @<<' . "\n" .
205 '$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)' . "\n" .
206 "<<\n\n";
207 }
208 }
209 #$}
210
211 $(COMMDIR)/y_tab.obj: $*.c $(COMMDIR)/lex_yy.c
212 cl @<<
213 $(CPPFLAGS2) -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@ /I ..\common /c $*.c
214 <<
215
216 $(COMMDIR)/y_tab.c: $(COMMDIR)/dosyacc.c
217 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
218
219 $(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c
220 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
221
222 $(OBJECTS): $(WXDIR)/include/wx/setup.h
223
224 # Peripheral components
225
226 zlib:
227 cd $(WXDIR)\src\zlib
228 nmake -f makefile.dos FINAL=$(FINAL)
229 cd $(WXDIR)\src\msw
230
231 clean_zlib:
232 cd $(WXDIR)\src\zlib
233 nmake -f makefile.dos clean
234 cd $(WXDIR)\src\msw
235
236 png:
237 cd $(WXDIR)\src\png
238 nmake -f makefile.dos FINAL=$(FINAL)
239 cd $(WXDIR)\src\msw
240
241 clean_png:
242 cd $(WXDIR)\src\png
243 nmake -f makefile.dos clean
244 cd $(WXDIR)\src\msw
245
246 clean: $(PERIPH_CLEAN_TARGET)
247 -erase *.obj
248 -erase ..\lib\*.lib
249 -erase *.pdb
250 -erase *.sbr
251 -erase *.pch
252 cd $(WXDIR)\src\generic
253 -erase *.pdb
254 -erase *.sbr
255 -erase *.obj
256 cd $(WXDIR)\src\common
257 -erase *.pdb
258 -erase *.sbr
259 -erase *.obj
260 cd $(WXDIR)\src\msw\ole
261 -erase *.pdb
262 -erase *.sbr
263 -erase *.obj
264 cd $(WXDIR)\src\msw
265
266 cleanall: clean
267
268
269 MFTYPE=dos
270 makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
271 cd $(WXWIN)\distrib\msw\tmake
272 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
273 copy makefile.$(MFTYPE) $(WXWIN)\src\msw