]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/tmake/dos.t
added a WXDLLEXPORT
[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 #! this file for some reason wasn't compiled for VC++ 1.52
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 $project{"WXCOBJS"} .= $obj if $isCFile;
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
43 $isCFile = $file =~ /\.c$/;
44 $file =~ s/cp?p?$/obj/;
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;
49 }
50 #$}
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
70 LIBTARGET=$(WXLIB)
71 DUMMYOBJ=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
77 MINIMAL_WXWINDOWS_SETUP=0
78
79 USE_XPM_IN_MSW=0
80 USE_CTL3D=1
81
82 !if "$(MINIMAL_WXWINDOWS_SETUP)" == "1"
83 USE_CTL3D=0
84 USE_XPM_IN_MSW=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 !if "$(USE_XPM_IN_MSW)" == "1"
96 PERIPH_LIBS=$(WXDIR)\contrib\wxxpm\xpm.lib $(PERIPH_LIBS)
97 PERIPH_TARGET=xpm $(PERIPH_TARGET)
98 PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET)
99 !endif
100
101 # PNG and Zlib
102 PERIPH_TARGET=png zlib $(PERIPH_TARGET)
103 PERIPH_CLEAN_TARGET=clean_png clean_zlib $(PERIPH_CLEAN_TARGET)
104
105 GENDIR=..\generic
106 COMMDIR=..\common
107 OLEDIR=.\ole
108 MSWDIR=.
109
110 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
111
112 COMMONOBJS = \
113 $(COMMDIR)\y_tab.obj \
114 #$ ExpandList("WXCOMMONOBJS");
115
116 # we can't have all objects in one list because the library becomes too big
117 MSWOBJS1 = #$ ExpandList("WXMSWOBJS1");
118
119 MSWOBJS2 = #$ ExpandList("WXMSWOBJS2");
120
121 # TODO: Implement XPM and PNG targets in this makefile!
122 # $(OLEDIR)\xpmhand \
123 # $(OLEDIR)\pnghand \
124
125 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS1) $(MSWOBJS2)
126
127 # Normal, static library
128 all: $(DUMMYOBJ) $(WXDIR)\lib\wx1.lib $(WXDIR)\lib\wx2.lib $(WXDIR)\lib\wx3.lib $(WXDIR)\lib\wx4.lib
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: $(MSWOBJS1)
151 -erase $(WXDIR)\lib\wx3.lib
152 lib /PAGESIZE:128 @<<
153 $(WXDIR)\lib\wx3.lib
154 y
155 $(MSWOBJS1)
156 nul
157 ;
158 <<
159
160 $(WXDIR)\lib\wx4.lib: $(MSWOBJS2)
161 -erase $(WXDIR)\lib\wx4.lib
162 lib /PAGESIZE:128 @<<
163 $(WXDIR)\lib\wx4.lib
164 y
165 $(MSWOBJS2)
166 nul
167 ;
168 <<
169
170 ########################################################
171 # Windows-specific objects
172
173 dummy.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
181 dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
182 cl @<<
183 $(CPPFLAGS) /YcWX/WXPREC.H /c /Tp $*.$(SRCSUFF)
184 <<
185
186 #${
187 $_ = $project{"WXMSWOBJS1"} . $project{"WXMSWOBJS2"} . $project{"WXCOMMONOBJS"} . $project{"WXGENERICOBJS"};
188 my @objs = split;
189 foreach (@objs) {
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 }
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
222 xpm:
223 cd $(WXDIR)\src\xpm
224 nmake -f makefile.dos FINAL=$(FINAL)
225 cd $(WXDIR)\src\msw
226
227 clean_xpm:
228 cd $(WXDIR)\src\xpm
229 nmake -f makefile.dos clean
230 cd $(WXDIR)\src\msw
231
232 zlib:
233 cd $(WXDIR)\src\zlib
234 nmake -f makefile.dos FINAL=$(FINAL)
235 cd $(WXDIR)\src\msw
236
237 clean_zlib:
238 cd $(WXDIR)\src\zlib
239 nmake -f makefile.dos clean
240 cd $(WXDIR)\src\msw
241
242 png:
243 cd $(WXDIR)\src\png
244 nmake -f makefile.dos FINAL=$(FINAL)
245 cd $(WXDIR)\src\msw
246
247 clean_png:
248 cd $(WXDIR)\src\png
249 nmake -f makefile.dos clean
250 cd $(WXDIR)\src\msw
251
252 clean: $(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
272 cleanall: clean
273
274
275 MFTYPE=dos
276 makefile.$(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