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