2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00
Files
build/darwin-tools.jam
Rene Rivera 896ae7a0fc Minor changes to attempt getting Python build working on MacOS-X with Python 2.3 framework.
- darwin-tools.jam; added warnings feature to control warning output.
- darwin-tools.jam; disable some Apple speicfic options when using g++ directly.
- darwin-tools.jam; disable dylib versioning, for now.
- python.jam; remove shared link to pyton2.3 lib for embebed targets.
- python.jam; remove uneeded path to python libraries, implicitly there because of framework use.
- python.jam; disable warnings, for now.


[SVN r18529]
2003-05-24 16:24:46 +00:00

213 lines
6.8 KiB
Plaintext

# (C) Copyright Rene Rivera 2002-2003. 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://gcc.gnu.org/">GNU<br>GCC</a>
# For adding framwork libraries; like <framework>Python, <framework>Carbon, etc.
free-feature framework ;
# Specify the loader for bundles.
free-feature bundle-loader ;
# Controll generation of compiler warnings.
feature warnings : on off ;
# compute directories for invoking GCC
#
# The gcc toolset can be user-configured using the following
# variables:
#
# GCC_ROOT_DIRECTORY
# The directory in which GCC was installed. Defaults to
# unset. Usually, there is no need to set this variable at
# all. However, if G++ is not in the path it is usually
# sufficient to configure this one variable. More fine-grained
# configuration is available by setting the following:
#
# GCC_BIN_DIRECTORY
# the directory prefix used to find the gcc executables. Defaults to
# $(GCC_ROOT_DIRECTORY)/bin/, or "" if GCC_ROOT_DIRECTORY is
# not set.
#
# GCC_INCLUDE_DIRECTORY
# the directory in which to find system includes. Defaults to
# empty.
#
# GCC_STDLIB_DIRECTORY
# the directory in which to find the standard library
# objects associated with this build of gcc. Defaults to
# $(GCC_ROOT_DIRECTORY)/lib.
#
# GXX
# The name by which g++ is invoked. You can also use this in
# lieu of setting the <cxxflags> property to force options such
# as "-V3.0.4" into the g++ command line: "-sGXX=g++ -V3.0.4".
#
# GCC
# Similar to GXX, the name by which gcc is invoked for "C"
# language targets.
# singleton variables...
set-as-singleton GCC_ROOT_DIRECTORY GCC_BIN_DIRECTORY GCC_INCLUDE_DIRECTORY GCC_STDLIB_DIRECTORY ;
flags darwin GCC_BIN_DIRECTORY : $(GCC_BIN_DIRECTORY) ;
flags darwin GCC_INCLUDE_DIRECTORY : $(GCC_INCLUDE_DIRECTORY) ;
flags darwin GCC_STDLIB_DIRECTORY : $(GCC_STDLIB_DIRECTORY) ;
if ! $(GCC_BIN_DIRECTORY) { flags darwin GCC_BIN_DIRECTORY : $(GCC_ROOT_DIRECTORY)/bin/ ; }
if ! $(GCC_BIN_DIRECTORY) { flags darwin GCC_BIN_DIRECTORY : "" ; }
if ! $(GCC_STDLIB_DIRECTORY) { flags darwin GCC_STDLIB_DIRECTORY : $(GCC_ROOT_DIRECTORY)/lib ; }
flags darwin .GCC_BIN_DIR : $(GCC_BIN_DIRECTORY) ;
flags darwin .GXX : $(GXX) ;
flags darwin .GCC : $(GCC) ;
if ! $(.GXX) && $(GCC_ROOT_DIRECTORY) { flags darwin .GXX : g++ ; }
if ! $(.GXX) { flags darwin .GXX : c++ ; }
if ! $(.GCC) && $(GCC_ROOT_DIRECTORY) { flags darwin .GCC : gcc ; }
if ! $(.GCC) { flags darwin .GCC : cc ; }
flags darwin CFLAGS <cflags> ;
flags darwin C++FLAGS <cxxflags> ;
flags darwin DEFINES <define> ;
flags darwin UNDEFS <undef> ;
flags darwin HDRS <include> ;
flags darwin STDHDRS <sysinclude> ;
flags darwin LINKFLAGS <linkflags> ;
flags darwin LIBPATH <library-path> ;
flags darwin NEEDLIBS <library-file> ;
flags darwin FINDLIBS <find-library> ;
flags darwin ARFLAGS <arflags> ;
flags darwin TARGET_TYPE <target-type> ;
flags darwin FRAMEWORKS <framework> ;
flags darwin DLLVERSION <dllversion> ;
flags darwin DLLVERSION : $(DLLVERSION[1]) ;
flags darwin BUNDLE_LOADER <bundle-loader> ;
flags darwin ARFLAGS ;
if ! $(ARFLAGS) { flags darwin ARFLAGS : "" ; }
if ! $(DLLVERSION) { flags darwin DLLVERSION : $(BOOST_VERSION) ; }
if ! [ MATCH "(gcc)" : $(.GCC) ]
{
flags darwin CFLAGS : -Wno-long-double -no-cpp-precomp ;
}
if ! [ MATCH "(g[+][+])" : $(.GXX) ]
{
flags darwin C++FLAGS : -fcoalesce-templates ;
}
flags darwin LINKFLAGS <runtime-link>static : -static-libgcc ;
flags darwin CFLAGS <debug-symbols>on : -g ;
flags darwin LINKFLAGS <debug-symbols>on : -g ;
flags darwin LINKFLAGS <debug-symbols>off : -Wl,-x ;
flags darwin CFLAGS <optimization>off : -O0 ;
flags darwin CFLAGS <optimization>speed : -O3 ;
flags darwin CFLAGS <optimization>space : -Os ;
flags darwin CFLAGS <inlining>off : -fno-inline ;
flags darwin CFLAGS <inlining>on : -Wno-inline ;
flags darwin CFLAGS <inlining>full : -finline-functions -Wno-inline ;
flags darwin CFLAGS <profiling>on : -pg ;
flags darwin LINKFLAGS <profiling>on : -pg ;
flags darwin C++FLAGS <rtti>off : -fno-rtti ;
flags darwin C++FLAGS <vtable-thunks>on : -fvtable-thunks ;
flags darwin C++FLAGS <vtable-thunks>off : -fvtable-thunks=0 ;
flags darwin CFLAGS <shared-linkable>true : -fPIC ;
flags darwin CFLAGS <warnings>on : -Wall ;
flags darwin CFLAGS <warnings>off : -w ;
if $(BUNDLE_LOADER)
{
flags darwin LINKFLAGS <target-type>$(SHARED_TYPES) :
-bundle ;
}
else
{
flags darwin LINKFLAGS <target-type>$(SHARED_TYPES) :
-Wl,-dynamic -nostartfiles -Wl,-dylib -Wl,-ldylib1.o ;
}
#### Link ####
rule Link-action
{
_ on $(<) = " " ;
DEPENDS $(<) : $(NEEDLIBS) $(NEEDIMPS) ;
if $(DLLVERSION) && $(TARGET_TYPE) in $(SHARED_TYPES) && ! $(BUNDLE_LOADER)
{
DLLFLAGS on $(<) = ;
#~ DLLFLAGS on $(<) =
#~ "-Wl,-dylib_compatibility_version,$(DLLVERSION) -W,l-dylib_current_version,$(DLLVERSION)" ;
darwin-Link-DyLib-action $(<) : $(>) ;
}
else
{
DLLFLAGS on $(<) = ;
darwin-Link-action $(<) : $(>) ;
}
}
actions darwin-Link-action bind NEEDLIBS NEEDIMPS
{
$(SHELL_SET)$(gSHELL_LIBPATH)=$(RUN_LD_LIBRARY_PATH)
$(SHELL_EXPORT)$(gSHELL_LIBPATH)
$(.GCC_BIN_DIR)$(.GXX) $(LINKFLAGS) -o "$(<[1])" "$(>)" \
-L"$(LIBPATH:T)" -L"$(STDLIBPATH:T)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) \
-framework$(_)$(FRAMEWORKS) -bundle_loader$(_)"$(BUNDLE_LOADER)" "$(BUNDLE_LOADER)"
}
actions darwin-Link-DyLib-action bind NEEDLIBS NEEDIMPS
{
$(SHELL_SET)$(gSHELL_LIBPATH)=$(RUN_LD_LIBRARY_PATH)
$(SHELL_EXPORT)$(gSHELL_LIBPATH)
ld -dynamic -m -r -d -o "$(<[1]:S=.lo)" "$(>)" \
&& \
$(.GCC_BIN_DIR)$(.GXX) $(LINKFLAGS) $(DLLFLAGS) -o "$(<[1])" "$(<[1]:S=.lo)" \
-L"$(LIBPATH:T)" -L"$(STDLIBPATH:T)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) \
-framework$(_)$(FRAMEWORKS) \
&& \
rm -f "$(<[1]:S=.lo)"
}
#### Cc #####
rule Cc-action
{
_ on $(<) = " " ;
darwin-Cc-action $(<) : $(>) ;
}
actions darwin-Cc-action
{
$(.GCC_BIN_DIR)$(.GCC) -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
}
#### C++ ####
rule C++-action
{
_ on $(<) = " " ;
darwin-C++-action $(<) : $(>) ;
}
actions darwin-C++-action
{
$(.GCC_BIN_DIR)$(.GXX) -c -ftemplate-depth-120 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
}
#### Archive ####
rule Archive-action
{
darwin-Archive-action $(<) : $(>) ;
}
actions updated together piecemeal darwin-Archive-action
{
ar -r -s $(ARFLAGS) "$(<:T)" "$(>:T)"
}