From 8193ea28e28fcb3b08efe3bf99ca5a19e6c458a9 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 29 Aug 2003 07:33:28 +0000 Subject: [PATCH] Add Darwin toolset, from Christopher Currie. [SVN r19851] --- src/tools/darwin.jam | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/tools/darwin.jam diff --git a/src/tools/darwin.jam b/src/tools/darwin.jam new file mode 100644 index 000000000..53dca48b9 --- /dev/null +++ b/src/tools/darwin.jam @@ -0,0 +1,40 @@ +# 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 toolset : flags ; + +toolset.register darwin ; +toolset.inherit darwin : gcc ; + +rule init ( ) +{ + +} + +flags darwin.link.dll OPTIONS : -Wl,-dynamic -nostartfiles -Wl,-dylib -Wl,-ldylib1.o ; + +actions link bind LIBRARIES +{ + $(NAME:E=g++) $(OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) +} + +actions link.dll bind LIBRARIES +{ + ld -dynamic -m -r -d -o "$(<:S=.lo)" "$(>)" \ + && \ + $(NAME:E=g++) $(OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(<:S=.lo)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) \ + && \ + rm -f "$(<:S=.lo)" +} + +actions piecemeal archive +{ + ar -r -s $(ARFLAGS) "$(<:T)" "$(>:T)" +} +