From 06430b007b1e5c71d2a44272d9933cb7349ae6c5 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Thu, 26 Mar 2015 19:35:52 +1000 Subject: [PATCH 1/2] 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 From 7c046e2307ba9eed918e437fb85389f14668381c Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Sun, 29 Mar 2015 11:43:56 +1000 Subject: [PATCH 2/2] For github pull request #33 - GLEW version in glew.h Allow for tools to extract the GLEW version from glew.h directly. No functional change for C API. See: https://github.com/nigels-com/glew/pull/33/files --- auto/Makefile | 6 +++++- auto/src/glew_tail.h | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/auto/Makefile b/auto/Makefile index e05ceef..a10d44a 100644 --- a/auto/Makefile +++ b/auto/Makefile @@ -143,8 +143,12 @@ $(I.DEST)/glew.h: $(EXT)/.dummy $(BIN)/make_struct_var.pl GLEW_VAR_EXPORT $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@ echo -e "\n#ifdef GLEW_MX\n}; /* GLEWContextStruct */\n#endif /* GLEW_MX */\n" >> $@ perl -e "s/GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_2;/GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_1;\nGLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_2;/" -pi $@ - rm -f $@.bak cat $(SRC)/glew_tail.h >> $@ + perl -e "s/GLEW_VERSION_STRING/$(GLEW_VERSION)/g" -pi $@ + perl -e "s/GLEW_VERSION_MAJOR_STRING/$(GLEW_MAJOR)/g" -pi $@ + perl -e "s/GLEW_VERSION_MINOR_STRING/$(GLEW_MINOR)/g" -pi $@ + perl -e "s/GLEW_VERSION_MICRO_STRING/$(GLEW_MICRO)/g" -pi $@ + rm -f $@.bak $(I.DEST)/wglew.h: $(EXT)/.dummy @echo "--------------------------------------------------------------------" diff --git a/auto/src/glew_tail.h b/auto/src/glew_tail.h index bd9be0a..92ac0bd 100644 --- a/auto/src/glew_tail.h +++ b/auto/src/glew_tail.h @@ -13,6 +13,17 @@ #define GLEW_VERSION_MINOR 3 #define GLEW_VERSION_MICRO 4 +/* ------------------------------------------------------------------------- */ + +/* GLEW version info */ + +/* +VERSION GLEW_VERSION_STRING +VERSION_MAJOR GLEW_VERSION_MAJOR_STRING +VERSION_MINOR GLEW_VERSION_MINOR_STRING +VERSION_MICRO GLEW_VERSION_MICRO_STRING +*/ + /* API */ #ifdef GLEW_MX