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