mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
* Set the proper suffix for shared libraries
* Added C and C++ compile options used in v1:
-Wno-long-double, -no-cpp-precomp, and -fcoalesce-templates
* Converted the link.dll rule to use the bundled libtool
* Added support for linking to frameworks
Patch from Christopher Currie.
[SVN r20695]
58 lines
1.6 KiB
Plaintext
58 lines
1.6 KiB
Plaintext
# Copyright (C) Christopher Currie 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.
|
|
|
|
# Please see http://article.gmane.org/gmane.comp.lib.boost.build/3389/
|
|
# for explanation why it's a separate toolset.
|
|
|
|
import feature : feature ;
|
|
import toolset : flags ;
|
|
import type ;
|
|
|
|
toolset.register darwin ;
|
|
toolset.inherit darwin : gcc ;
|
|
|
|
# No additional initialization should be necessary
|
|
rule init ( )
|
|
{
|
|
|
|
}
|
|
|
|
# Darwin has a different shared library suffix
|
|
type.set-generated-target-suffix SHARED_LIB : <toolset>darwin : dylib ;
|
|
|
|
feature framework : : free ;
|
|
|
|
flags darwin.compile OPTIONS <link>shared : -dynamic ;
|
|
flags darwin.compile OPTIONS : -Wno-long-double -no-cpp-precomp ;
|
|
flags darwin.compile.c++ OPTIONS : -fcoalesce-templates ;
|
|
|
|
flags darwin.link FRAMEWORK <framework> ;
|
|
|
|
# This is flag is useful for debugging the link step
|
|
# uncomment to see what libtool is doing under the hood
|
|
# flags darwin.link.dll OPTIONS : -Wl,-v ;
|
|
|
|
actions link bind LIBRARIES
|
|
{
|
|
$(NAME:E=g++) $(OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) -framework$(_)$(FRAMEWORK)
|
|
}
|
|
|
|
rule link.dll
|
|
{
|
|
_ on $(<) = " " ;
|
|
}
|
|
|
|
actions link.dll bind LIBRARIES
|
|
{
|
|
$(NAME:E=g++) -dynamiclib $(OPTIONS) -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) -framework$(_)$(FRAMEWORK)
|
|
}
|
|
|
|
actions piecemeal archive
|
|
{
|
|
ar -r -s $(ARFLAGS) "$(<:T)" "$(>:T)"
|
|
}
|
|
|