From bcdc9df17f770d29933ab49b66cd6ce3d5bf7788 Mon Sep 17 00:00:00 2001 From: ikits Date: Sun, 9 May 2004 09:36:16 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@263 783a27ee-832a-0410-bc00-9f386506c6dd --- Makefile | 17 +++++++++++++++-- auto/src/glewinfo_post.c | 2 +- auto/src/glewinfo_pre.c | 2 +- doc/README.html | 4 ++-- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index b104330..0fa5c44 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,9 @@ NAME = glew32 CC = gcc -mno-cygwin LD = ld CFLAGS.EXTRA = -DGLEW_STATIC +ifneq (undefined, $(origin GLEW_MX)) +CFLAGS.EXTRA += -DGLEW_MX +endif LDFLAGS.SO = -shared -soname $(LIB.SONAME) LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32 LDFLAGS.EXTRA = @@ -69,7 +72,9 @@ NAME = glew32 CC = gcc # use gcc for linking, with ld it does not work LD = gcc -CFLAGS.EXTRA = +ifneq (undefined, $(origin GLEW_MX)) +CFLAGS.EXTRA = -DGLEW_MX +endif CFLAGS.SO = -DGLEW_BUILD #LDFLAGS.SO = -shared -soname $(LIB.SONAME) --out-implib lib/$(LIB.DEVLNK) LDFLAGS.SO = -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK) @@ -119,7 +124,9 @@ LD = ld ABI = -64# -n32 CC += $(ABI) LD += $(ABI) -CFLAGS.EXTRA = +ifneq (undefined, $(origin GLEW_MX)) +CFLAGS.EXTRA = -DGLEW_MX +endif LDFLAGS.SO = -shared -soname $(LIB.SONAME) LDFLAGS.EXTRA = LDFLAGS.GL = -lGL -lXext -lX11 @@ -141,6 +148,9 @@ NAME = GLEW CC = cc LD = cc CFLAGS.EXTRA = -no-cpp-precomp -dynamic -fno-common +ifneq (undefined, $(origin GLEW_MX)) +CFLAGS.EXTRA += -DGLEW_MX +endif LDFLAGS.SO = -dynamiclib -install_name $(GLEW_DEST)/lib/$(LIB.SHARED) LDFLAGS.EXTRA = ifneq (undefined, $(origin GLEW_APPLE_GLX)) @@ -167,6 +177,9 @@ NAME = GLEW CC = cc LD = ld CFLAGS.EXTRA = -I/usr/openwin/include +ifneq (undefined, $(origin GLEW_MX)) +CFLAGS.EXTRA += -DGLEW_MX +endif LDFLAGS.SO = -G LDFLAGS.EXTRA = -L/usr/openwin/lib LDFLAGS.GL = -lXmu -lXi -lGLU -lGL -lXext -lX11 diff --git a/auto/src/glewinfo_post.c b/auto/src/glewinfo_post.c index d5eb45d..55d4493 100644 --- a/auto/src/glewinfo_post.c +++ b/auto/src/glewinfo_post.c @@ -44,7 +44,7 @@ int main (void) err = glewContextInit(glewGetContext()); #ifdef _WIN32 err = err || wglewContextInit(wglewGetContext()); -#else +#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) err = err || glxewContextInit(glxewGetContext()); #endif diff --git a/auto/src/glewinfo_pre.c b/auto/src/glewinfo_pre.c index eb32eaa..2d50d08 100644 --- a/auto/src/glewinfo_pre.c +++ b/auto/src/glewinfo_pre.c @@ -47,7 +47,7 @@ GLEWContext _glewctx; #ifdef _WIN32 WGLEWContext _wglewctx; #define wglewGetContext() (&_wglewctx) -#else +#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) GLXEWContext _glxewctx; #define glxewGetContext() (&_glxewctx) #endif diff --git a/doc/README.html b/doc/README.html index 78d0337..c1c4a41 100644 --- a/doc/README.html +++ b/doc/README.html @@ -566,8 +566,8 @@ generation scripts are released under the GPL.
  • 1.2.2 [05-08-04]

  • 1.2.1 [03-18-04]