1 #!#############################################################################
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
8 #!#############################################################################
11 #! include the code which parses filelist.txt file and initializes
12 #! %wxCommon, %wxGeneric and %wxMSW hashes.
13 IncludeTemplate("filelist.t");
15 #! now transform these hashes into $project tags
16 foreach $file (sort keys %wxGeneric) {
18 next if $wxGeneric{$file} =~ /\b(PS|G|U)\b/;
20 $file =~ s/cp?p?$/obj/;
21 $project{"WXGENERICOBJS"} .= "\$(MSWDIR)\\" . $file . " "
24 foreach $file (sort keys %wxCommon) {
25 #! socket files don't compile under Win16 currently
26 next if $wxCommon{$file} =~ /\b(32|S)\b/;
28 #! needs extra files (sql*.h) so not compiled by default.
29 next if $file =~ /^odbc\./;
31 $isCFile = $file =~ /\.c$/;
32 $file =~ s/cp?p?$/obj/;
33 $obj = "\$(MSWDIR)\\" . $file . " ";
34 $project{"WXCOMMONOBJS"} .= $obj;
35 $project{"WXCOBJS"} .= $obj if $isCFile;
38 #! special hack for Borland in 16 bits needs this file
39 $project{"WXCOMMONOBJS"} .= '${MSWDIR}\resourc2.cpp';
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/;
45 $file =~ s/cp?p?$/obj/;
46 $project{"WXMSWOBJS"} .= "\$(MSWDIR)\\" . $file . " "
50 # This file was automatically generated by tmake at #$ Now()
51 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T!
55 # Author: Julian Smart
58 # Copyright:(c) 1993, AIAI, University of Edinburgh
62 # Makefile : Builds wxWindows library wx.lib for Windows 3.1
66 !error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
70 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
74 # !error You must start compiling from wx\src, not wx\src\msw.
83 !include $(WXDIR)\src\makebcc.env
85 THISDIR = $(WXDIR)\src\msw
87 # Please set these according to the settings in wx_setup.h, so we can include
88 # the appropriate libraries in wx.lib
96 !if "$(USE_CTL3D)" == "1"
97 PERIPH_LIBS=$(BCCDIR)\lib\ctl3dv2.lib $(PERIPH_LIBS)
100 !if "$(USE_XPM_IN_MSW)" == "1"
101 PERIPH_LIBS=$(WXDIR)\xpm.lib $(PERIPH_LIBS)
102 PERIPH_TARGET=xpm $(PERIPH_TARGET)
103 PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET)
106 # TODO: add these libraries
107 # PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(PERIPH_LIBS)
108 PERIPH_TARGET=zlib png $(PERIPH_TARGET)
109 PERIPH_CLEAN_TARGET=clean_zlib clean_png $(PERIPH_CLEAN_TARGET)
111 CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
113 LIBTARGET= $(WXLIBDIR)\wx.lib
121 DOCDIR = $(WXDIR)\docs
123 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
126 $(MSWDIR)\y_tab.obj \
127 #$ ExpandList("WXCOMMONOBJS");
129 MSWOBJS = #$ ExpandList("WXMSWOBJS");
131 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
135 wx: $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
137 $(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(PERIPH_LIBS)
139 tlib $(LIBTARGET) /P1024 @&&!
140 +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
143 dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
144 dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
146 $(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
149 # $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
152 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
153 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
155 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
156 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
158 # $(OBJECTS): $(WXDIR)\include\wx\setup.h
161 $_ = $project{"WXMSWOBJS"};
166 $text .= $_ . "\n\n";
170 ########################################################
171 # Common objects (always compiled)
174 $_ = $project{"WXCOMMONOBJS"};
178 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
181 $text .= $_ . "\n\n";
185 ########################################################
186 # Generic objects (not always compiled, depending on
187 # whether platforms have native implementations)
190 $_ = $project{"WXGENERICOBJS"};
196 $text .= $_ . "\n\n";
212 make -f makefile.bcc all_execs
217 make -f makefile.bcc ctl3d dib fafa gauge hytext itsy prologio rcparser wx wxgraph\
218 wxstring wxtree mfutils # wxxpm
222 make -f makefile.bcc ctl3d fafa wxstring itsy gauge # wxxpm
226 cd $(WXDIR)\src\msw\ctl3d\borland
227 make -f makefile.bcc -DCFG=$(CFG)
232 make -f makefile.bcc -DCFG=$(CFG) -DFINAL=$(FINAL) -DWXWIN=$(WXDIR) -DDEBUG=$(DEBUG)
242 make -f makefile.bcc clean
252 make -f makefile.bcc clean
257 -H=$(WXDIR)\src\msw\borland.pch
272 -I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/png;$(WXDIR)/src/zlib;$(WXDIR)/src/xpm
273 -I$(WXDIR)\include\wx\msw\gnuwin32
280 !if "$(BOR_VER)" == "3.1"
282 !elif "$(BOR_VER)" == "4"
283 echo -Ff=512 >>$(CFG)
286 echo -Ff=512 >>$(CFG)
292 clean: $(PERIPH_CLEAN_TARGET)
298 erase ..\common\y_tab.c
299 erase ..\common\lex_yy.c
305 makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
306 cd $(WXWIN)\distrib\msw\tmake
307 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
308 copy makefile.$(MFTYPE) $(WXWIN)\src\msw