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