]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/tmake/bcc.t
1. fixed makefile.vc for OLE files
[wxWidgets.git] / distrib / msw / tmake / bcc.t
1 #!#############################################################################
2 #! File: bcc.t
3 #! Purpose: tmake template file from which makefile.bcc is generated by running
4 #! tmake -t bcc wxwin.pro -o makefile.bcc
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 my $tag = "";
18 next if $wxGeneric{$file} =~ /\b(PS|G|U)\b/;
19
20 $file =~ s/cp?p?$/obj/;
21 $project{"WXGENERICOBJS"} .= "\$(MSWDIR)\\" . $file . " "
22 }
23
24 foreach $file (sort keys %wxCommon) {
25 #! socket files don't compile under Win16 currently
26 next if $wxCommon{$file} =~ /\b(32|S)\b/;
27
28 #! needs extra files (sql*.h) so not compiled by default.
29 next if $file =~ /^odbc\./;
30
31 $file =~ s/cp?p?$/obj/;
32 $project{"WXCOMMONOBJS"} .= "\$(MSWDIR)\\" . $file . " "
33 }
34
35 #! special hack for Borland in 16 bits needs this file
36 $project{"WXCOMMONOBJS"} .= '${MSWDIR}\resourc2.cpp';
37
38 foreach $file (sort keys %wxMSW) {
39 #! don't take files not appropriate for 16-bit Windows
40 next if $wxMSW{$file} =~ /\b(32|O)\b/;
41
42 $file =~ s/cp?p?$/obj/;
43 $project{"WXMSWOBJS"} .= "\$(MSWDIR)\\" . $file . " "
44 }
45 #$}
46
47 # This file was automatically generated by tmake at #$ Now()
48 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T!
49
50 #
51 # File: makefile.bcc
52 # Author: Julian Smart
53 # Created: 1993
54 # Updated:
55 # Copyright:(c) 1993, AIAI, University of Edinburgh
56 #
57 # "%W% %G%"
58 #
59 # Makefile : Builds wxWindows library wx.lib for Windows 3.1
60 # and Borland C++ 3.1
61
62 !if "$(BCCDIR)" == ""
63 !error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
64 !endif
65
66 !if "$(WXWIN)" == ""
67 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
68 !endif
69
70 !if "$(CFG)" == ""
71 # !error You must start compiling from wx\src, not wx\src\msw.
72 !endif
73
74 !ifndef DEBUG
75 DEBUG=0
76 !endif
77
78 WXDIR = $(WXWIN)
79
80 !include $(WXDIR)\src\makebcc.env
81
82 THISDIR = $(WXDIR)\src\msw
83
84 # Please set these according to the settings in wx_setup.h, so we can include
85 # the appropriate libraries in wx.lib
86 USE_CTL3D=1
87 USE_XPM_IN_MSW=0
88
89 PERIPH_LIBS=
90 PERIPH_TARGET=
91 PERIPH_CLEAN_TARGET=
92
93 !if "$(USE_CTL3D)" == "1"
94 PERIPH_LIBS=$(BCCDIR)\lib\ctl3dv2.lib $(PERIPH_LIBS)
95 !endif
96
97 !if "$(USE_XPM_IN_MSW)" == "1"
98 PERIPH_LIBS=$(WXDIR)\xpm.lib $(PERIPH_LIBS)
99 PERIPH_TARGET=xpm $(PERIPH_TARGET)
100 PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET)
101 !endif
102
103 # TODO: add these libraries
104 # PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(PERIPH_LIBS)
105 PERIPH_TARGET=zlib png $(PERIPH_TARGET)
106 PERIPH_CLEAN_TARGET=clean_zlib clean_png $(PERIPH_CLEAN_TARGET)
107
108 CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
109
110 LIBTARGET= $(WXLIBDIR)\wx.lib
111 DUMMY=dummy
112
113 GENDIR=..\generic
114 COMMDIR=..\common
115 OLEDIR=.\ole
116 MSWDIR=.
117
118 DOCDIR = $(WXDIR)\docs
119
120 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
121
122 COMMONOBJS = \
123 $(MSWDIR)\y_tab.obj \
124 #$ ExpandList("WXCOMMONOBJS");
125
126 MSWOBJS = #$ ExpandList("WXMSWOBJS");
127
128 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
129
130 default: wx
131
132 wx: $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
133
134 $(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(PERIPH_LIBS)
135 erase $(LIBTARGET)
136 tlib $(LIBTARGET) /P1024 @&&!
137 +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
138 !
139
140 dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
141 dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
142
143 $(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
144
145 # cl @<<
146 # $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
147 # <<
148
149 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
150 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
151
152 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
153 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
154
155 # $(OBJECTS): $(WXDIR)\include\wx\setup.h
156
157 #${
158 $_ = $project{"WXMSWOBJS"};
159 my @objs = split;
160 foreach (@objs) {
161 $text .= $_ . ": ";
162 s/obj/\$(SRCSUFF)/;
163 $text .= $_ . "\n\n";
164 }
165 #$}
166
167 ########################################################
168 # Common objects (always compiled)
169
170 #${
171 $_ = $project{"WXCOMMONOBJS"};
172 my @objs = split;
173 foreach (@objs) {
174 $text .= $_ . ": ";
175 s/MSWDIR/COMMDIR/;
176 s/obj/\$(SRCSUFF)/;
177 $text .= $_ . "\n\n";
178 }
179 #$}
180
181 ########################################################
182 # Generic objects (not always compiled, depending on
183 # whether platforms have native implementations)
184
185 #${
186 $_ = $project{"WXGENERICOBJS"};
187 my @objs = split;
188 foreach (@objs) {
189 $text .= $_ . ": ";
190 s/MSWDIR/GENDIR/;
191 s/obj/\$(SRCSUFF)/;
192 $text .= $_ . "\n\n";
193 }
194 #$}
195
196 all_utils:
197 cd $(WXDIR)\utils
198 make -f makefile.bcc
199 cd $(WXDIR)\src\msw
200
201 all_samples:
202 cd $(WXDIR)\samples
203 make -f makefile.bcc
204 cd $(WXDIR)\src\msw
205
206 all_execs:
207 cd $(WXDIR)\utils
208 make -f makefile.bcc all_execs
209 cd $(WXDIR)\src\msw
210
211 all_libs:
212 cd $(WXDIR)\src\msw
213 make -f makefile.bcc ctl3d dib fafa gauge hytext itsy prologio rcparser wx wxgraph\
214 wxstring wxtree mfutils # wxxpm
215
216 all_contribs:
217 cd $(WXDIR)\src\msw
218 make -f makefile.bcc ctl3d fafa wxstring itsy gauge # wxxpm
219
220 # CONTRIB
221 ctl3d: $(CFG)
222 cd $(WXDIR)\src\msw\ctl3d\borland
223 make -f makefile.bcc -DCFG=$(CFG)
224 cd $(WXDIR)\src\msw
225
226 wxxpm: $(CFG)
227 cd $(WXDIR)\src\xpm
228 make -f makefile.bcc -DCFG=$(CFG) -DFINAL=$(FINAL) -DWXWIN=$(WXDIR) -DDEBUG=$(DEBUG)
229 cd $(WXDIR)\src\msw
230
231 png: $(CFG)
232 cd $(WXDIR)\src\png
233 make -f makefile.bcc
234 cd $(WXDIR)\src\msw
235
236 clean_png:
237 cd $(WXDIR)\src\png
238 make -f makefile.bcc clean
239 cd $(WXDIR)\src\msw
240
241 zlib: $(CFG)
242 cd $(WXDIR)\src\zlib
243 make -f makefile.bcc
244 cd $(WXDIR)\src\msw
245
246 clean_zlib:
247 cd $(WXDIR)\src\zlib
248 make -f makefile.bcc clean
249 cd $(WXDIR)\src\msw
250
251 $(CFG): makefile.bcc
252 copy &&!
253 -H=$(WXDIR)\src\msw\borland.pch
254 -2
255 -P
256 -d
257 -w-hid
258 -w-par
259 -w-pia
260 -w-aus
261 -w-rch
262 -ml
263 -Od
264 -WE
265 -Fs-
266 -Vf
267 -Ff=4
268 -I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/png;$(WXDIR)/src/zlib;$(WXDIR)/src/xpm
269 -I$(WXDIR)\include\wx\msw\gnuwin32
270 -L$(BCCDIR)\lib
271 -D__WXWIN__
272 -D__WXMSW__
273 -D__WINDOWS__
274 -D__WIN16__
275 ! $(CFG)
276 !if "$(BOR_VER)" == "3.1"
277 echo -Ff=4 >>$(CFG)
278 !elif "$(BOR_VER)" == "4"
279 echo -Ff=512 >>$(CFG)
280 echo -dc >>$(CFG)
281 !else
282 echo -Ff=512 >>$(CFG)
283 echo -dc >>$(CFG)
284 !endif
285
286 # -O was: -Oxt
287
288 clean: $(PERIPH_CLEAN_TARGET)
289 erase $(LIBTARGET)
290 erase *.obj
291 erase *.pch
292 erase *.csm
293 erase *.cfg
294 erase ..\common\y_tab.c
295 erase ..\common\lex_yy.c
296
297 cleanall: clean
298
299