1 #!#############################################################################
3 #! Purpose: tmake template file from which makefile.bcc is generated by running
4 #! tmake -t bcc wxwin.pro -o makefile.bcc
7 #! - resourc2.obj is not correctly generated (see list and target).
8 #! - cpp is incorrectly substituted into filenames containing 'obj'
10 #! Author: Vadim Zeitlin
13 #!#############################################################################
16 #! include the code which parses filelist.txt file and initializes
17 #! %wxCommon, %wxGeneric and %wxMSW hashes.
18 IncludeTemplate("filelist.t");
20 #! now transform these hashes into $project tags
21 foreach $file (sort keys %wxGeneric) {
23 if ( $wxGeneric{$file} =~ /\b(PS|G|U)\b/ ) {
24 #! Need this file too since it has wxGenericPageSetupDialog
25 next unless $file =~ /^prntdlgg\./;
28 $file =~ s/cp?p?$/obj/;
29 $project{"WXGENERICOBJS"} .= "\$(MSWDIR)\\" . $file . " "
32 foreach $file (sort keys %wxCommon) {
33 #! socket files don't compile under Win16 currently
34 next if $wxCommon{$file} =~ /\b(32|S|U)\b/;
36 #! needs extra files (sql*.h) so not compiled by default.
37 next if $file =~ /^odbc\./;
39 $isCFile = $file =~ /\.c$/;
40 $file =~ s/cp?p?$/obj/;
41 $obj = "\$(MSWDIR)\\" . $file . " ";
42 $project{"WXCOMMONOBJS"} .= $obj;
43 $project{"WXCOBJS"} .= $obj if $isCFile;
46 #! special hack for Borland in 16 bits needs this file
47 $project{"WXCOMMONOBJS"} .= '${MSWDIR}\resourc2.obj';
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/;
53 $isCFile = $file =~ /\.c$/;
54 $file =~ s/cp?p?$/obj/;
55 $obj = "\$(MSWDIR)\\" . $file . " ";
56 $project{"WXMSWOBJS"} .= $obj;
57 $project{"WXCOBJS"} .= $obj if $isCFile;
61 # This file was automatically generated by tmake
62 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T!
66 # Author: Julian Smart
73 # Makefile : Builds wxWindows library wx.lib for Windows 3.1
77 !error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
81 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
85 # !error You must start compiling from wx\src, not wx\src\msw.
94 !include $(WXDIR)\src\makebcc.env
96 THISDIR = $(WXDIR)\src\msw
98 # Please set these according to the settings in wx_setup.h, so we can include
99 # the appropriate libraries in wx.lib
106 !if "$(USE_CTL3D)" == "1"
107 PERIPH_LIBS=$(WXDIR)\lib\bcc16\ctl3dv2.lib $(PERIPH_LIBS)
110 # TODO: add these libraries
111 # PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(PERIPH_LIBS)
112 PERIPH_TARGET=zlib png $(PERIPH_TARGET)
113 PERIPH_CLEAN_TARGET=clean_zlib clean_png $(PERIPH_CLEAN_TARGET)
115 CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
117 LIBTARGET= $(WXLIBDIR)\wx.lib
125 DOCDIR = $(WXDIR)\docs
127 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
130 #$ ExpandList("WXCOMMONOBJS");
132 MSWOBJS = #$ ExpandList("WXMSWOBJS");
134 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
138 wx: $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
140 $(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(PERIPH_LIBS)
142 tlib $(LIBTARGET) /P2048 @&&!
143 +$(COMMONOBJS:.obj =.obj +)\
144 +$(GENERICOBJS:.obj =.obj +)\
145 +$(MSWOBJS:.obj =.obj +)\
146 +$(PERIPH_LIBS:.lib =.lib +)
149 dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
150 dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
152 # $(OBJECTS): $(WXDIR)\include\wx\setup.h
155 $_ = $project{"WXMSWOBJS"};
159 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
161 $text .= $_ . "\n\n";
165 ########################################################
166 # Common objects (always compiled)
169 $_ = $project{"WXCOMMONOBJS"};
173 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
176 $text .= $_ . "\n\n";
180 ########################################################
181 # Generic objects (not always compiled, depending on
182 # whether platforms have native implementations)
185 $_ = $project{"WXGENERICOBJS"};
191 $text .= $_ . "\n\n";
207 make -f makefile.bcc all_execs
218 make -f makefile.bcc clean
228 make -f makefile.bcc clean
233 -H=$(WXDIR)\src\msw\borland.pch
248 -I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/zlib
249 -I$(WXDIR)\include\wx\msw\gnuwin32
256 !if "$(BOR_VER)" == "3.1"
258 !elif "$(BOR_VER)" == "4"
259 echo -Ff=512 >>$(CFG)
262 echo -Ff=512 >>$(CFG)
268 clean: $(PERIPH_CLEAN_TARGET)
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
283 cd $(WXWIN)\distrib\msw\tmake
284 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
285 copy makefile.$(MFTYPE) $(WXWIN)\src\msw