1999-07-14 18:46:12 -04:00
|
|
|
#!#############################################################################
|
|
|
|
#! File: bcc.t
|
|
|
|
#! Purpose: tmake template file from which makefile.bcc is generated by running
|
|
|
|
#! tmake -t bcc wxwin.pro -o makefile.bcc
|
1999-10-24 15:50:17 -04:00
|
|
|
#!
|
|
|
|
#! TODO:
|
|
|
|
#! - resourc2.obj is not correctly generated (see list and target).
|
|
|
|
#! - cpp is incorrectly substituted into filenames containing 'obj'
|
|
|
|
#!
|
1999-07-14 18:46:12 -04:00
|
|
|
#! Author: Vadim Zeitlin
|
|
|
|
#! Created: 14.07.99
|
|
|
|
#! Version: $Id$
|
|
|
|
#!#############################################################################
|
|
|
|
|
|
|
|
#${
|
|
|
|
#! include the code which parses filelist.txt file and initializes
|
|
|
|
#! %wxCommon, %wxGeneric and %wxMSW hashes.
|
|
|
|
IncludeTemplate("filelist.t");
|
|
|
|
|
|
|
|
#! now transform these hashes into $project tags
|
|
|
|
foreach $file (sort keys %wxGeneric) {
|
|
|
|
my $tag = "";
|
2000-03-20 11:32:55 -05:00
|
|
|
if ( $wxGeneric{$file} =~ /\b(PS|G|U)\b/ ) {
|
|
|
|
#! Need this file too since it has wxGenericPageSetupDialog
|
|
|
|
next unless $file =~ /^prntdlgg\./;
|
|
|
|
}
|
1999-07-14 18:46:12 -04:00
|
|
|
|
|
|
|
$file =~ s/cp?p?$/obj/;
|
|
|
|
$project{"WXGENERICOBJS"} .= "\$(MSWDIR)\\" . $file . " "
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach $file (sort keys %wxCommon) {
|
|
|
|
#! socket files don't compile under Win16 currently
|
|
|
|
next if $wxCommon{$file} =~ /\b(32|S)\b/;
|
|
|
|
|
|
|
|
#! needs extra files (sql*.h) so not compiled by default.
|
|
|
|
next if $file =~ /^odbc\./;
|
|
|
|
|
1999-07-16 19:06:35 -04:00
|
|
|
$isCFile = $file =~ /\.c$/;
|
1999-07-14 18:46:12 -04:00
|
|
|
$file =~ s/cp?p?$/obj/;
|
1999-07-16 19:06:35 -04:00
|
|
|
$obj = "\$(MSWDIR)\\" . $file . " ";
|
|
|
|
$project{"WXCOMMONOBJS"} .= $obj;
|
|
|
|
$project{"WXCOBJS"} .= $obj if $isCFile;
|
1999-07-14 18:46:12 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
#! special hack for Borland in 16 bits needs this file
|
1999-10-24 15:50:17 -04:00
|
|
|
$project{"WXCOMMONOBJS"} .= '${MSWDIR}\resourc2.obj';
|
1999-07-14 18:46:12 -04:00
|
|
|
|
|
|
|
foreach $file (sort keys %wxMSW) {
|
|
|
|
#! don't take files not appropriate for 16-bit Windows
|
|
|
|
next if $wxMSW{$file} =~ /\b(32|O)\b/;
|
|
|
|
|
1999-10-01 19:00:30 -04:00
|
|
|
$isCFile = $file =~ /\.c$/;
|
1999-07-14 18:46:12 -04:00
|
|
|
$file =~ s/cp?p?$/obj/;
|
1999-10-01 19:00:30 -04:00
|
|
|
$obj = "\$(MSWDIR)\\" . $file . " ";
|
|
|
|
$project{"WXMSWOBJS"} .= $obj;
|
|
|
|
$project{"WXCOBJS"} .= $obj if $isCFile;
|
1999-07-14 18:46:12 -04:00
|
|
|
}
|
|
|
|
#$}
|
|
|
|
|
|
|
|
# This file was automatically generated by tmake at #$ Now()
|
|
|
|
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T!
|
|
|
|
|
|
|
|
#
|
|
|
|
# File: makefile.bcc
|
|
|
|
# Author: Julian Smart
|
|
|
|
# Created: 1993
|
|
|
|
# Updated:
|
|
|
|
# Copyright:(c) 1993, AIAI, University of Edinburgh
|
|
|
|
#
|
|
|
|
# "%W% %G%"
|
|
|
|
#
|
|
|
|
# Makefile : Builds wxWindows library wx.lib for Windows 3.1
|
|
|
|
# and Borland C++ 3.1
|
|
|
|
|
|
|
|
!if "$(BCCDIR)" == ""
|
|
|
|
!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
|
|
|
|
!endif
|
|
|
|
|
|
|
|
!if "$(WXWIN)" == ""
|
|
|
|
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
|
|
|
|
!endif
|
|
|
|
|
|
|
|
!if "$(CFG)" == ""
|
|
|
|
# !error You must start compiling from wx\src, not wx\src\msw.
|
|
|
|
!endif
|
|
|
|
|
|
|
|
!ifndef DEBUG
|
|
|
|
DEBUG=0
|
|
|
|
!endif
|
|
|
|
|
|
|
|
WXDIR = $(WXWIN)
|
|
|
|
|
|
|
|
!include $(WXDIR)\src\makebcc.env
|
|
|
|
|
|
|
|
THISDIR = $(WXDIR)\src\msw
|
|
|
|
|
|
|
|
# Please set these according to the settings in wx_setup.h, so we can include
|
|
|
|
# the appropriate libraries in wx.lib
|
|
|
|
USE_CTL3D=1
|
|
|
|
|
|
|
|
PERIPH_LIBS=
|
|
|
|
PERIPH_TARGET=
|
|
|
|
PERIPH_CLEAN_TARGET=
|
|
|
|
|
|
|
|
!if "$(USE_CTL3D)" == "1"
|
1999-10-25 03:41:07 -04:00
|
|
|
PERIPH_LIBS=$(WXDIR)\lib\bcc16\ctl3dv2.lib $(PERIPH_LIBS)
|
1999-07-14 18:46:12 -04:00
|
|
|
!endif
|
|
|
|
|
|
|
|
# TODO: add these libraries
|
|
|
|
# PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(PERIPH_LIBS)
|
|
|
|
PERIPH_TARGET=zlib png $(PERIPH_TARGET)
|
|
|
|
PERIPH_CLEAN_TARGET=clean_zlib clean_png $(PERIPH_CLEAN_TARGET)
|
|
|
|
|
|
|
|
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
|
|
|
|
|
|
|
|
LIBTARGET= $(WXLIBDIR)\wx.lib
|
|
|
|
DUMMY=dummy
|
|
|
|
|
|
|
|
GENDIR=..\generic
|
|
|
|
COMMDIR=..\common
|
|
|
|
OLEDIR=.\ole
|
|
|
|
MSWDIR=.
|
|
|
|
|
|
|
|
DOCDIR = $(WXDIR)\docs
|
|
|
|
|
|
|
|
GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
|
|
|
|
|
|
|
|
COMMONOBJS = \
|
|
|
|
$(MSWDIR)\y_tab.obj \
|
|
|
|
#$ ExpandList("WXCOMMONOBJS");
|
|
|
|
|
|
|
|
MSWOBJS = #$ ExpandList("WXMSWOBJS");
|
|
|
|
|
|
|
|
OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
|
|
|
|
|
|
|
|
default: wx
|
|
|
|
|
|
|
|
wx: $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
|
|
|
|
|
|
|
|
$(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(PERIPH_LIBS)
|
|
|
|
erase $(LIBTARGET)
|
2000-01-30 08:43:37 -05:00
|
|
|
tlib $(LIBTARGET) /P2048 @&&!
|
1999-10-24 15:50:17 -04:00
|
|
|
+$(COMMONOBJS:.obj =.obj +)\
|
|
|
|
+$(GENERICOBJS:.obj =.obj +)\
|
|
|
|
+$(MSWOBJS:.obj =.obj +)\
|
|
|
|
+$(PERIPH_LIBS:.lib =.lib +)
|
1999-07-14 18:46:12 -04:00
|
|
|
!
|
|
|
|
|
|
|
|
dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
|
|
|
|
dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
|
|
|
|
|
|
|
|
$(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
|
|
|
|
|
|
|
|
# cl @<<
|
|
|
|
# $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
|
|
|
|
# <<
|
|
|
|
|
|
|
|
$(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
|
|
|
|
copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
|
|
|
|
|
|
|
|
$(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
|
|
|
|
copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
|
|
|
|
|
|
|
|
# $(OBJECTS): $(WXDIR)\include\wx\setup.h
|
|
|
|
|
|
|
|
#${
|
|
|
|
$_ = $project{"WXMSWOBJS"};
|
|
|
|
my @objs = split;
|
|
|
|
foreach (@objs) {
|
|
|
|
$text .= $_ . ": ";
|
1999-10-01 19:00:30 -04:00
|
|
|
$suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
|
1999-10-25 03:41:07 -04:00
|
|
|
s/obj$/$suffix/;
|
1999-07-14 18:46:12 -04:00
|
|
|
$text .= $_ . "\n\n";
|
|
|
|
}
|
|
|
|
#$}
|
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Common objects (always compiled)
|
|
|
|
|
|
|
|
#${
|
|
|
|
$_ = $project{"WXCOMMONOBJS"};
|
|
|
|
my @objs = split;
|
|
|
|
foreach (@objs) {
|
|
|
|
$text .= $_ . ": ";
|
1999-07-16 19:06:35 -04:00
|
|
|
$suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
|
1999-07-14 18:46:12 -04:00
|
|
|
s/MSWDIR/COMMDIR/;
|
1999-10-25 03:41:07 -04:00
|
|
|
s/obj$/$suffix/;
|
1999-07-14 18:46:12 -04:00
|
|
|
$text .= $_ . "\n\n";
|
|
|
|
}
|
|
|
|
#$}
|
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Generic objects (not always compiled, depending on
|
|
|
|
# whether platforms have native implementations)
|
|
|
|
|
|
|
|
#${
|
|
|
|
$_ = $project{"WXGENERICOBJS"};
|
|
|
|
my @objs = split;
|
|
|
|
foreach (@objs) {
|
|
|
|
$text .= $_ . ": ";
|
|
|
|
s/MSWDIR/GENDIR/;
|
1999-10-25 03:41:07 -04:00
|
|
|
s/obj$/\$(SRCSUFF)/;
|
1999-07-14 18:46:12 -04:00
|
|
|
$text .= $_ . "\n\n";
|
|
|
|
}
|
|
|
|
#$}
|
|
|
|
|
|
|
|
all_utils:
|
|
|
|
cd $(WXDIR)\utils
|
|
|
|
make -f makefile.bcc
|
|
|
|
cd $(WXDIR)\src\msw
|
|
|
|
|
|
|
|
all_samples:
|
|
|
|
cd $(WXDIR)\samples
|
|
|
|
make -f makefile.bcc
|
|
|
|
cd $(WXDIR)\src\msw
|
|
|
|
|
|
|
|
all_execs:
|
|
|
|
cd $(WXDIR)\utils
|
|
|
|
make -f makefile.bcc all_execs
|
|
|
|
cd $(WXDIR)\src\msw
|
|
|
|
|
|
|
|
# CONTRIB
|
|
|
|
png: $(CFG)
|
|
|
|
cd $(WXDIR)\src\png
|
1999-07-23 17:26:57 -04:00
|
|
|
make -f makefile.bcc
|
1999-07-14 18:46:12 -04:00
|
|
|
cd $(WXDIR)\src\msw
|
|
|
|
|
|
|
|
clean_png:
|
|
|
|
cd $(WXDIR)\src\png
|
|
|
|
make -f makefile.bcc clean
|
|
|
|
cd $(WXDIR)\src\msw
|
|
|
|
|
|
|
|
zlib: $(CFG)
|
|
|
|
cd $(WXDIR)\src\zlib
|
|
|
|
make -f makefile.bcc
|
|
|
|
cd $(WXDIR)\src\msw
|
|
|
|
|
|
|
|
clean_zlib:
|
|
|
|
cd $(WXDIR)\src\zlib
|
|
|
|
make -f makefile.bcc clean
|
|
|
|
cd $(WXDIR)\src\msw
|
|
|
|
|
|
|
|
$(CFG): makefile.bcc
|
|
|
|
copy &&!
|
|
|
|
-H=$(WXDIR)\src\msw\borland.pch
|
|
|
|
-2
|
|
|
|
-P
|
|
|
|
-d
|
|
|
|
-w-hid
|
|
|
|
-w-par
|
|
|
|
-w-pia
|
|
|
|
-w-aus
|
|
|
|
-w-rch
|
|
|
|
-ml
|
|
|
|
-Od
|
|
|
|
-WE
|
|
|
|
-Fs-
|
|
|
|
-Vf
|
|
|
|
-Ff=4
|
2001-05-09 18:36:51 -04:00
|
|
|
-I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/zlib
|
1999-07-14 18:46:12 -04:00
|
|
|
-I$(WXDIR)\include\wx\msw\gnuwin32
|
|
|
|
-L$(BCCDIR)\lib
|
|
|
|
-D__WXWIN__
|
|
|
|
-D__WXMSW__
|
|
|
|
-D__WINDOWS__
|
|
|
|
-D__WIN16__
|
|
|
|
! $(CFG)
|
|
|
|
!if "$(BOR_VER)" == "3.1"
|
|
|
|
echo -Ff=4 >>$(CFG)
|
|
|
|
!elif "$(BOR_VER)" == "4"
|
|
|
|
echo -Ff=512 >>$(CFG)
|
|
|
|
echo -dc >>$(CFG)
|
|
|
|
!else
|
|
|
|
echo -Ff=512 >>$(CFG)
|
|
|
|
echo -dc >>$(CFG)
|
|
|
|
!endif
|
|
|
|
|
|
|
|
# -O was: -Oxt
|
|
|
|
|
|
|
|
clean: $(PERIPH_CLEAN_TARGET)
|
|
|
|
erase $(LIBTARGET)
|
|
|
|
erase *.obj
|
|
|
|
erase *.pch
|
|
|
|
erase *.csm
|
|
|
|
erase *.cfg
|
|
|
|
erase ..\common\y_tab.c
|
|
|
|
erase ..\common\lex_yy.c
|
|
|
|
|
|
|
|
cleanall: clean
|
|
|
|
|
|
|
|
|
1999-07-23 17:26:57 -04:00
|
|
|
MFTYPE=bcc
|
1999-09-29 11:55:50 -04:00
|
|
|
# Can't use this or we'll have to distribute all tmake files with wxWindows
|
|
|
|
#makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
|
|
|
|
|
|
|
|
self:
|
1999-07-23 17:26:57 -04:00
|
|
|
cd $(WXWIN)\distrib\msw\tmake
|
|
|
|
tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
|
|
|
|
copy makefile.$(MFTYPE) $(WXWIN)\src\msw
|