mirror of
https://github.com/boostorg/build.git
synced 2026-02-17 01:32:12 +00:00
156 lines
4.4 KiB
Plaintext
156 lines
4.4 KiB
Plaintext
# (C) Copyright John Maddock 2002.
|
|
# (C) Copyright David Abrahams 2001. Permission to copy, use,
|
|
# modify, sell and distribute this software is granted provided this
|
|
# copyright notice appears in all copies. This software is provided
|
|
# "as is" without express or implied warranty, and with no claim as
|
|
# to its suitability for any purpose.
|
|
|
|
# The following #// line will be used by the regression test table generation
|
|
# program as the column heading for HTML tables. Must not include version number.
|
|
#//<a href="http://www.borland.com/bcppbuilder/freecompiler/">Kylix</a>
|
|
|
|
# Borland tool definitions for Kylix.
|
|
|
|
# BCCROOT is the install location of the kylix tools.
|
|
set-as-singleton BCCROOT ;
|
|
|
|
# compute kylix tool path
|
|
# You can either put the kylix bin directory in your PATH, or you can set
|
|
# BCCROOT to point at the kylix installation directory
|
|
BCC_TOOL_PATH = $(BCCROOT)$(SLASH)bin$(SLASH) ;
|
|
BCC_TOOL_PATH ?= "" ; # Don't clobber adjoining text if BCCROOT isn't set
|
|
|
|
# specify compilation and link flags
|
|
flags kylix CFLAGS <debug-symbols>on : -v ;
|
|
flags kylix LINKFLAGS <debug-symbols>on : -v ;
|
|
flags kylix CFLAGS <optimization>off : -Od ;
|
|
flags kylix CFLAGS <optimization>speed : -O2 ;
|
|
flags kylix CFLAGS <optimization>space : -O1 ;
|
|
flags kylix CFLAGS <inlining>off : -vi- ;
|
|
flags kylix CFLAGS <inlining>on : -vi -w-inl ;
|
|
flags kylix CFLAGS <inlining>full : -vi -w-inl ;
|
|
|
|
# build the options common to the link and C/C++ command-lines
|
|
{
|
|
local bcc-common-flags ;
|
|
|
|
# this section sets up the target type (threading,
|
|
# RTL, and console/GUI options).
|
|
|
|
|
|
local target-type = [ get-values <target-type> : $(gBUILD_PROPERTIES) ] ;
|
|
if ! $(target-type) || ! ( $(target-type) in $(SHARED_TYPES) )
|
|
{
|
|
flags kylix bcc-common-flags <user-interface>console : -tC ;
|
|
flags kylix bcc-common-flags <user-interface>gui : -t ;
|
|
}
|
|
else
|
|
{
|
|
flags kylix bcc-common-flags <runtime-link>dynamic : -tD ;
|
|
}
|
|
|
|
flags kylix bcc-common-flags <target-type>$(SHARED_TYPES) : -tD ;
|
|
|
|
flags kylix LINKFLAGS : $(bcc-common-flags) ;
|
|
flags kylix CFLAGS : $(bcc-common-flags) ;
|
|
}
|
|
|
|
|
|
flags kylix CFLAGS <cflags> ;
|
|
flags kylix C++FLAGS <cxxflags> ;
|
|
flags kylix DEFINES <define> ;
|
|
flags kylix UNDEFS <undef> ;
|
|
flags kylix HDRS <include> ;
|
|
flags kylix STDHDRS <sysinclude> ;
|
|
flags kylix LINKFLAGS <linkflags> ;
|
|
flags kylix ARFLAGS <arflags> ;
|
|
flags kylix FINDLIBS : pthread ;
|
|
flags kylix FINDLIBS : rt ;
|
|
flags kylix FINDLIBS : m ;
|
|
flags kylix FINDLIBS : dl ;
|
|
flags kylix CFLAGS <threading>single : -DBOOST_NO_THREADS ;
|
|
|
|
flags kylix STDHDRS : $(BCCROOT)$(SLASH)include ;
|
|
flags kylix STDLIBPATH : $(BCCROOT)$(SLASH)lib ;
|
|
|
|
flags kylix LIBPATH <library-path> ;
|
|
flags kylix NEEDLIBS <library-file> ;
|
|
flags kylix FINDLIBS <find-library> ;
|
|
|
|
# For detailed information about kylix tools and their command-line switches,
|
|
# see http://www.objectcentral.com/vide/help/videdoc/bcc32.html
|
|
|
|
#### Link ####
|
|
|
|
rule Link-action
|
|
{
|
|
# Make sure that the kylix runtime dlls are in the runtime path
|
|
gRUN_PATH($(<)) += $(BCC_TOOL_PATH) ;
|
|
|
|
kylix-Link-action $(<) : $(>) $(NEEDLIBS) ;
|
|
|
|
}
|
|
|
|
|
|
actions kylix-Link-action
|
|
{
|
|
export PATH=$(BCC_TOOL_PATH):$PATH
|
|
"$(BCC_TOOL_PATH)bc++" -v -q $(LINKFLAGS) -L"$(LIBPATH)" -L"$(STDLIBPATH)" -o"$(<[1])" "$(>)" lib$(FINDLIBS).so
|
|
}
|
|
|
|
#### Cc #####
|
|
|
|
rule Cc-action
|
|
{
|
|
kylix-Cc-action $(<) : $(>) ;
|
|
}
|
|
|
|
actions kylix-Cc-action
|
|
{
|
|
"$(BCC_TOOL_PATH)bc++" -P- -j5 -q -c -w -a8 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o"$(<)" "$(>)"
|
|
}
|
|
|
|
#### C++ ####
|
|
rule C++-action
|
|
{
|
|
kylix-C++-action $(<) : $(>) ;
|
|
}
|
|
|
|
#
|
|
# for C++ compiles the following options are turned on by default:
|
|
#
|
|
# -j5 stops after 5 errors
|
|
# -q no banner
|
|
# -c compile to object
|
|
# -P C++ code regardless of file extention
|
|
# -w turns on all warnings
|
|
# -Ve zero sized empty base classes, this option is on in the IDE by default
|
|
# and effects binary compatibility.
|
|
# -Vx zero sized empty members, this option is on in the IDE by default
|
|
# and effects binary compatibility.
|
|
# -a8 8 byte alignment, this option is on in the IDE by default
|
|
# and effects binary compatibility.
|
|
#
|
|
actions kylix-C++-action
|
|
{
|
|
"$(BCC_TOOL_PATH)bc++" -j5 -q -c -w -Ve -Vx -a8 -x -xd -RT -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o"$(<)" "$(>)"
|
|
}
|
|
|
|
#### Archive ####
|
|
rule Archive-action
|
|
{
|
|
kylix-Archive-action $(<) : $(>) ;
|
|
}
|
|
|
|
actions updated together piecemeal kylix-Archive-action
|
|
{
|
|
ar -r $(<) $(>)
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|