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 next if $wxGeneric{$file} =~ /\b(PS|G|U)\b/;
25 $file =~ s/cp?p?$/obj/;
26 $project{"WXGENERICOBJS"} .= "\$(MSWDIR)\\" . $file . " "
29 foreach $file (sort keys %wxCommon) {
30 #! socket files don't compile under Win16 currently
31 next if $wxCommon{$file} =~ /\b(32|S)\b/;
33 #! needs extra files (sql*.h) so not compiled by default.
34 next if $file =~ /^odbc\./;
36 $isCFile = $file =~ /\.c$/;
37 $file =~ s/cp?p?$/obj/;
38 $obj = "\$(MSWDIR)\\" . $file . " ";
39 $project{"WXCOMMONOBJS"} .= $obj;
40 $project{"WXCOBJS"} .= $obj if $isCFile;
43 #! special hack for Borland in 16 bits needs this file
44 $project{"WXCOMMONOBJS"} .= '${MSWDIR}\resourc2.obj';
46 foreach $file (sort keys %wxMSW) {
47 #! don't take files not appropriate for 16-bit Windows
48 next if $wxMSW{$file} =~ /\b(32|O)\b/;
50 $isCFile = $file =~ /\.c$/;
51 $file =~ s/cp?p?$/obj/;
52 $obj = "\$(MSWDIR)\\" . $file . " ";
53 $project{"WXMSWOBJS"} .= $obj;
54 $project{"WXCOBJS"} .= $obj if $isCFile;
58 # This file was automatically generated by tmake at #$ Now()
59 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T!
63 # Author: Julian Smart
66 # Copyright:(c) 1993, AIAI, University of Edinburgh
70 # Makefile : Builds wxWindows library wx.lib for Windows 3.1
74 !error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
78 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
82 # !error You must start compiling from wx\src, not wx\src\msw.
91 !include $(WXDIR)\src\makebcc.env
93 THISDIR = $(WXDIR)\src\msw
95 # Please set these according to the settings in wx_setup.h, so we can include
96 # the appropriate libraries in wx.lib
104 !if "$(USE_CTL3D)" == "1"
105 PERIPH_LIBS=$(WXDIR)\lib\bcc16\ctl3dv2.lib $(PERIPH_LIBS)
108 !if "$(USE_XPM_IN_MSW)" == "1"
109 PERIPH_LIBS=$(WXDIR)\xpm.lib $(PERIPH_LIBS)
110 PERIPH_TARGET=xpm $(PERIPH_TARGET)
111 PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET)
114 # TODO: add these libraries
115 # PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(PERIPH_LIBS)
116 PERIPH_TARGET=zlib png $(PERIPH_TARGET)
117 PERIPH_CLEAN_TARGET=clean_zlib clean_png $(PERIPH_CLEAN_TARGET)
119 CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
121 LIBTARGET= $(WXLIBDIR)\wx.lib
129 DOCDIR = $(WXDIR)\docs
131 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
134 $(MSWDIR)\y_tab.obj \
135 #$ ExpandList("WXCOMMONOBJS");
137 MSWOBJS = #$ ExpandList("WXMSWOBJS");
139 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
143 wx: $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
145 $(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(PERIPH_LIBS)
147 tlib $(LIBTARGET) /P1024 @&&!
148 +$(COMMONOBJS:.obj =.obj +)\
149 +$(GENERICOBJS:.obj =.obj +)\
150 +$(MSWOBJS:.obj =.obj +)\
151 +$(PERIPH_LIBS:.lib =.lib +)
154 dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
155 dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
157 $(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
160 # $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
163 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
164 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
166 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
167 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
169 # $(OBJECTS): $(WXDIR)\include\wx\setup.h
172 $_ = $project{"WXMSWOBJS"};
176 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
178 $text .= $_ . "\n\n";
182 ########################################################
183 # Common objects (always compiled)
186 $_ = $project{"WXCOMMONOBJS"};
190 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
193 $text .= $_ . "\n\n";
197 ########################################################
198 # Generic objects (not always compiled, depending on
199 # whether platforms have native implementations)
202 $_ = $project{"WXGENERICOBJS"};
208 $text .= $_ . "\n\n";
224 make -f makefile.bcc all_execs
229 make -f makefile.bcc dib fafa gauge hytext itsy prologio rcparser wx wxgraph\
230 wxstring wxtree mfutils # wxxpm
234 make -f makefile.bcc fafa wxstring itsy gauge # wxxpm
239 make -f makefile.bcc -DCFG=$(CFG) -DFINAL=$(FINAL) -DWXWIN=$(WXDIR) -DDEBUG=$(DEBUG)
249 make -f makefile.bcc clean
259 make -f makefile.bcc clean
264 -H=$(WXDIR)\src\msw\borland.pch
279 -I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/zlib;$(WXDIR)/src/xpm
280 -I$(WXDIR)\include\wx\msw\gnuwin32
287 !if "$(BOR_VER)" == "3.1"
289 !elif "$(BOR_VER)" == "4"
290 echo -Ff=512 >>$(CFG)
293 echo -Ff=512 >>$(CFG)
299 clean: $(PERIPH_CLEAN_TARGET)
305 erase ..\common\y_tab.c
306 erase ..\common\lex_yy.c
312 # Can't use this or we'll have to distribute all tmake files with wxWindows
313 #makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
316 cd $(WXWIN)\distrib\msw\tmake
317 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
318 copy makefile.$(MFTYPE) $(WXWIN)\src\msw