From 06430b007b1e5c71d2a44272d9933cb7349ae6c5 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Thu, 26 Mar 2015 19:35:52 +1000 Subject: [PATCH] First try AR, then try LIBTOOL... --- Makefile | 11 +++++++++++ config/Makefile.darwin-universal | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 45bc9a4..792e779 100644 --- a/Makefile +++ b/Makefile @@ -105,7 +105,11 @@ lib: mkdir lib lib/$(LIB.STATIC): $(LIB.OBJS) +ifneq ($(AR),) $(AR) $(ARFLAGS) $@ $^ +else ifneq ($(LIBTOOL),) + $(LIBTOOL) $@ $^ +endif ifneq ($(STRIP),) $(STRIP) -x $@ endif @@ -149,7 +153,14 @@ glew.pc: glew.pc.in glew.lib.mx: lib lib/$(LIB.SHARED.MX) lib/$(LIB.STATIC.MX) glewmx.pc lib/$(LIB.STATIC.MX): $(LIB.OBJS.MX) +ifneq ($(AR),) $(AR) $(ARFLAGS) $@ $^ +else ifneq ($(LIBTOOL),) + $(LIBTOOL) $@ $^ +endif +ifneq ($(STRIP),) + $(STRIP) -x $@ +endif lib/$(LIB.SHARED.MX): $(LIB.SOBJS.MX) $(LD) $(LDFLAGS.SO.MX) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS) diff --git a/config/Makefile.darwin-universal b/config/Makefile.darwin-universal index b2ba4af..5f3f278 100644 --- a/config/Makefile.darwin-universal +++ b/config/Makefile.darwin-universal @@ -1,8 +1,8 @@ NAME = $(GLEW_NAME) CC = cc LD = cc -AR = LIBTOOL -ARFLAGS = -static -o +AR = +LIBTOOL = libtool -static -o STRIP = CFLAGS.EXTRA = -dynamic -fno-common #CFLAGS.EXTRA += -no-cpp-precomp