diff options
author | 2016-02-03 04:23:08 +0100 | |
---|---|---|
committer | 2016-02-03 04:23:08 +0100 | |
commit | 6e72daece575aa4f17e08f9ea62231cfe6f52181 (patch) | |
tree | edfb0e7f0bfd0b8d7d4ca350ac3a66abcebb556b /templates | |
parent | 0342f82a925fcc9338685939feb4e09722763118 (diff) |
Using libtool instead of ar under MacOS.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/Makefile.template | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/templates/Makefile.template b/templates/Makefile.template index afe83a8336..a15ec171c9 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -151,15 +151,21 @@ LD = $(LD_$(CONFIG)) endif LDXX ?= $(LDXX_$(CONFIG)) + ifeq ($(SYSTEM),Linux) ifeq ($(origin AR), default) - AR = ar + AR = ar rcs endif - ifeq ($(SYSTEM),Linux) STRIP ?= strip --strip-unneeded else ifeq ($(SYSTEM),Darwin) + ifeq ($(origin AR), default) + AR = libtool -o + endif STRIP ?= strip -x else + ifeq ($(origin AR), default) + AR = ar rcs + endif STRIP ?= strip endif endif @@ -1478,7 +1484,7 @@ $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/lib${lib.name}.a - $(Q) $(AR) rcs $(LIBDIR)/$(CONFIG)/lib${lib.name}.a $(LIB${lib.name.upper()}_OBJS) + $(Q) $(AR) $(LIBDIR)/$(CONFIG)/lib${lib.name}.a $(LIB${lib.name.upper()}_OBJS) % if lib.get('baselib', False): $(Q) rm -rf $(BUILDDIR_ABSOLUTE)/tmp-merge-${lib.name} $(Q) ( mkdir -p $(BUILDDIR_ABSOLUTE)/tmp-merge-${lib.name}/grpc ; <%text>\</%text> |