]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/tmake/bcc.t
copy install.txt and readme.txt
[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
6a253da1 34 next if $wxCommon{$file} =~ /\b(32|S|U)\b/;
f2071dda
VZ
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
0f04dbf3 61# This file was automatically generated by tmake
f2071dda
VZ
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:
f0f7bd8a 69# Copyright:
f2071dda
VZ
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
f2071dda
VZ
101
102PERIPH_LIBS=
103PERIPH_TARGET=
104PERIPH_CLEAN_TARGET=
105
106!if "$(USE_CTL3D)" == "1"
572eed55 107PERIPH_LIBS=$(WXDIR)\lib\bcc16\ctl3dv2.lib $(PERIPH_LIBS)
f2071dda
VZ
108!endif
109
f2071dda
VZ
110# TODO: add these libraries
111# PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(PERIPH_LIBS)
112PERIPH_TARGET=zlib png $(PERIPH_TARGET)
113PERIPH_CLEAN_TARGET=clean_zlib clean_png $(PERIPH_CLEAN_TARGET)
114
115CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
116
117LIBTARGET= $(WXLIBDIR)\wx.lib
118DUMMY=dummy
119
120GENDIR=..\generic
121COMMDIR=..\common
122OLEDIR=.\ole
123MSWDIR=.
124
125DOCDIR = $(WXDIR)\docs
126
127GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
128
129COMMONOBJS = \
f2071dda
VZ
130 #$ ExpandList("WXCOMMONOBJS");
131
132MSWOBJS = #$ ExpandList("WXMSWOBJS");
133
134OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
135
136default: wx
137
138wx: $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
139
140$(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(PERIPH_LIBS)
141 erase $(LIBTARGET)
f6081a04 142 tlib $(LIBTARGET) /P2048 @&&!
8fb3a512
JS
143+$(COMMONOBJS:.obj =.obj +)\
144+$(GENERICOBJS:.obj =.obj +)\
145+$(MSWOBJS:.obj =.obj +)\
146+$(PERIPH_LIBS:.lib =.lib +)
f2071dda
VZ
147!
148
149dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
150dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
151
f2071dda
VZ
152# $(OBJECTS): $(WXDIR)\include\wx\setup.h
153
154#${
155 $_ = $project{"WXMSWOBJS"};
156 my @objs = split;
157 foreach (@objs) {
158 $text .= $_ . ": ";
83b1f353 159 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
572eed55 160 s/obj$/$suffix/;
f2071dda
VZ
161 $text .= $_ . "\n\n";
162 }
163#$}
164
165########################################################
166# Common objects (always compiled)
167
168#${
169 $_ = $project{"WXCOMMONOBJS"};
170 my @objs = split;
171 foreach (@objs) {
172 $text .= $_ . ": ";
9b73db3c 173 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
f2071dda 174 s/MSWDIR/COMMDIR/;
572eed55 175 s/obj$/$suffix/;
f2071dda
VZ
176 $text .= $_ . "\n\n";
177 }
178#$}
179
180########################################################
181# Generic objects (not always compiled, depending on
182# whether platforms have native implementations)
183
184#${
185 $_ = $project{"WXGENERICOBJS"};
186 my @objs = split;
187 foreach (@objs) {
188 $text .= $_ . ": ";
189 s/MSWDIR/GENDIR/;
572eed55 190 s/obj$/\$(SRCSUFF)/;
f2071dda
VZ
191 $text .= $_ . "\n\n";
192 }
193#$}
194
195all_utils:
196 cd $(WXDIR)\utils
197 make -f makefile.bcc
198 cd $(WXDIR)\src\msw
199
200all_samples:
201 cd $(WXDIR)\samples
202 make -f makefile.bcc
203 cd $(WXDIR)\src\msw
204
205all_execs:
206 cd $(WXDIR)\utils
207 make -f makefile.bcc all_execs
208 cd $(WXDIR)\src\msw
209
f2071dda 210# CONTRIB
f2071dda
VZ
211png: $(CFG)
212 cd $(WXDIR)\src\png
9be9b974 213 make -f makefile.bcc
f2071dda
VZ
214 cd $(WXDIR)\src\msw
215
216clean_png:
217 cd $(WXDIR)\src\png
218 make -f makefile.bcc clean
219 cd $(WXDIR)\src\msw
220
221zlib: $(CFG)
222 cd $(WXDIR)\src\zlib
223 make -f makefile.bcc
224 cd $(WXDIR)\src\msw
225
226clean_zlib:
227 cd $(WXDIR)\src\zlib
228 make -f makefile.bcc clean
229 cd $(WXDIR)\src\msw
230
231$(CFG): makefile.bcc
232 copy &&!
233-H=$(WXDIR)\src\msw\borland.pch
234-2
235-P
236-d
237-w-hid
238-w-par
239-w-pia
240-w-aus
241-w-rch
242-ml
243-Od
244-WE
245-Fs-
246-Vf
247-Ff=4
268d5364 248-I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/zlib
f2071dda
VZ
249-I$(WXDIR)\include\wx\msw\gnuwin32
250-L$(BCCDIR)\lib
251-D__WXWIN__
252-D__WXMSW__
253-D__WINDOWS__
254-D__WIN16__
255! $(CFG)
256!if "$(BOR_VER)" == "3.1"
257 echo -Ff=4 >>$(CFG)
258!elif "$(BOR_VER)" == "4"
259 echo -Ff=512 >>$(CFG)
260 echo -dc >>$(CFG)
261!else
262 echo -Ff=512 >>$(CFG)
263 echo -dc >>$(CFG)
264!endif
265
266# -O was: -Oxt
267
268clean: $(PERIPH_CLEAN_TARGET)
269 erase $(LIBTARGET)
270 erase *.obj
271 erase *.pch
272 erase *.csm
273 erase *.cfg
f2071dda
VZ
274
275cleanall: clean
276
277
9be9b974 278MFTYPE=bcc
1b9315eb
JS
279# Can't use this or we'll have to distribute all tmake files with wxWindows
280#makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
281
282self:
9be9b974
RD
283 cd $(WXWIN)\distrib\msw\tmake
284 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
285 copy makefile.$(MFTYPE) $(WXWIN)\src\msw