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)\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 at #$ Now()
62 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T!
66 # Author: Julian Smart
69 # Copyright:(c) 1993, AIAI, University of Edinburgh
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
107 !if "$(USE_CTL3D)" == "1"
108 PERIPH_LIBS=$(WXDIR)\lib\bcc16\ctl3dv2.lib $(PERIPH_LIBS)
111 !if "$(USE_XPM_IN_MSW)" == "1"
112 PERIPH_LIBS=$(WXDIR)\lib\xpm.lib $(PERIPH_LIBS)
113 PERIPH_TARGET=xpm $(PERIPH_TARGET)
114 PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET)
117 # TODO: add these libraries
118 # PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(PERIPH_LIBS)
119 PERIPH_TARGET=zlib png $(PERIPH_TARGET)
120 PERIPH_CLEAN_TARGET=clean_zlib clean_png $(PERIPH_CLEAN_TARGET)
122 CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
124 LIBTARGET= $(WXLIBDIR)\wx.lib
132 DOCDIR = $(WXDIR)\docs
134 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
137 $(MSWDIR)\y_tab.obj \
138 #$ ExpandList("WXCOMMONOBJS");
140 MSWOBJS = #$ ExpandList("WXMSWOBJS");
142 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
146 wx: $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
148 $(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(PERIPH_LIBS)
150 tlib $(LIBTARGET) /P2048 @&&!
151 +$(COMMONOBJS:.obj =.obj +)\
152 +$(GENERICOBJS:.obj =.obj +)\
153 +$(MSWOBJS:.obj =.obj +)\
154 +$(PERIPH_LIBS:.lib =.lib +)
157 dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
158 dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
160 $(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
163 # $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
166 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
167 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
169 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
170 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
172 # $(OBJECTS): $(WXDIR)\include\wx\setup.h
175 $_ = $project{"WXMSWOBJS"};
179 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
181 $text .= $_ . "\n\n";
185 ########################################################
186 # Common objects (always compiled)
189 $_ = $project{"WXCOMMONOBJS"};
193 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
196 $text .= $_ . "\n\n";
200 ########################################################
201 # Generic objects (not always compiled, depending on
202 # whether platforms have native implementations)
205 $_ = $project{"WXGENERICOBJS"};
211 $text .= $_ . "\n\n";
227 make -f makefile.bcc all_execs
233 make -f makefile.bcc -DCFG=$(CFG) -DFINAL=$(FINAL) -DWXWIN=$(WXDIR) -DDEBUG=$(DEBUG)
238 make -f makefile.bcc clean
248 make -f makefile.bcc clean
258 make -f makefile.bcc clean
263 -H=$(WXDIR)\src\msw\borland.pch
278 -I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/zlib;$(WXDIR)/src/xpm
279 -I$(WXDIR)\include\wx\msw\gnuwin32
286 !if "$(BOR_VER)" == "3.1"
288 !elif "$(BOR_VER)" == "4"
289 echo -Ff=512 >>$(CFG)
292 echo -Ff=512 >>$(CFG)
298 clean: $(PERIPH_CLEAN_TARGET)
304 erase ..\common\y_tab.c
305 erase ..\common\lex_yy.c
311 # Can't use this or we'll have to distribute all tmake files with wxWindows
312 #makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
315 cd $(WXWIN)\distrib\msw\tmake
316 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
317 copy makefile.$(MFTYPE) $(WXWIN)\src\msw