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)" +} +