Fixups for GLEWAPIENTRY on Apple

This commit is contained in:
Nigel Stewart 2012-05-04 15:57:29 -05:00
parent 126f14f960
commit cb7c643fab
5 changed files with 14 additions and 11 deletions

View File

@ -117,11 +117,11 @@ endif
tmp/$(SYSTEM)/default/static/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
@mkdir -p $(dir $@)
$(CC) -DGLEW_NO_GLU -DGLEW_STATIC $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
$(CC) -DGLEW_NO_GLU -DGLEWAPIENTRY= -DGLEW_STATIC $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
tmp/$(SYSTEM)/default/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
@mkdir -p $(dir $@)
$(CC) -DGLEW_NO_GLU $(CFLAGS) $(PICFLAG) $(CFLAGS.SO) -o $@ -c $<
$(CC) -DGLEW_NO_GLU -DGLEWAPIENTRY= $(CFLAGS) $(PICFLAG) $(CFLAGS.SO) -o $@ -c $<
glew.pc: glew.pc.in
sed \
@ -153,11 +153,11 @@ endif
tmp/$(SYSTEM)/mx/static/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
@mkdir -p $(dir $@)
$(CC) -DGLEW_NO_GLU -DGLEW_MX -DGLEW_STATIC $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
$(CC) -DGLEW_NO_GLU -DGLEWAPIENTRY= -DGLEW_MX -DGLEW_STATIC $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
tmp/$(SYSTEM)/mx/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
@mkdir -p $(dir $@)
$(CC) -DGLEW_NO_GLU -DGLEW_MX $(CFLAGS) $(PICFLAG) $(CFLAGS.SO) -o $@ -c $<
$(CC) -DGLEW_NO_GLU -DGLEWAPIENTRY= -DGLEW_MX $(CFLAGS) $(PICFLAG) $(CFLAGS.SO) -o $@ -c $<
glewmx.pc: glew.pc.in
sed \

View File

@ -134,8 +134,8 @@ $(I.DEST)/wglew.h: $(EXT)/.dummy
cat $(SRC)/wglew_head.h >> $@
$(BIN)/make_header.pl WINAPI WGL $(WGL_EXT_SPEC) >> $@
echo -e "/* ------------------------------------------------------------------------- */\n\n#ifdef GLEW_MX\n#define WGLEW_EXPORT\n#else\n#define WGLEW_EXPORT GLEWAPI\n#endif /* GLEW_MX */\n\n#ifdef GLEW_MX\nstruct WGLEWContextStruct\n{\n#endif /* GLEW_MX */" >> $@
$(BIN)/make_struct_fun.pl WGLEW_EXPORT $(WGL_EXT_SPEC) >> $@
$(BIN)/make_struct_var.pl WGLEW_EXPORT $(WGL_EXT_SPEC) >> $@
$(BIN)/make_struct_fun.pl GLEW_FUN_EXPORT $(WGL_EXT_SPEC) >> $@
$(BIN)/make_struct_var.pl GLEW_VAR_EXPORT $(WGL_EXT_SPEC) >> $@
echo -e "\n#ifdef GLEW_MX\n}; /* WGLEWContextStruct */\n#endif /* GLEW_MX */\n" >> $@
cat $(SRC)/wglew_tail.h >> $@
@ -150,9 +150,9 @@ $(I.DEST)/glxew.h: $(EXT)/.dummy
$(BIN)/make_header.pl '' GLX $(GLX_CORE_SPEC) >> $@
$(BIN)/make_header.pl '' GLX $(GLX_EXT_SPEC) >> $@
echo -e "/* ------------------------------------------------------------------------- */\n\n#ifdef GLEW_MX\n#define GLXEW_EXPORT\n#else\n#define GLXEW_EXPORT extern\n#endif /* GLEW_MX */" >> $@
$(BIN)/make_struct_fun.pl extern $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
$(BIN)/make_struct_fun.pl GLEW_FUN_EXPORT $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
echo -e "\n#if defined(GLEW_MX)\nstruct GLXEWContextStruct\n{\n#endif /* GLEW_MX */\n" >> $@
$(BIN)/make_struct_var.pl GLXEW_EXPORT $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
$(BIN)/make_struct_var.pl GLEW_VAR_EXPORT $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
echo -e "\n#ifdef GLEW_MX\n}; /* GLXEWContextStruct */\n#endif /* GLEW_MX */\n" >> $@
perl -e 's/GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_2;/GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_0;\nGLXEW_EXPORT GLboolean __GLXEW_VERSION_1_1;\nGLXEW_EXPORT GLboolean __GLXEW_VERSION_1_2;/' -pi $@
cat $(SRC)/glxew_tail.h >> $@

View File

@ -1,7 +1,8 @@
NAME = $(GLEW_NAME)
CC = cc
LD = cc
CFLAGS.EXTRA = -no-cpp-precomp -dynamic -fno-common
CFLAGS.EXTRA = -dynamic -fno-common
#CFLAGS.EXTRA += -no-cpp-precomp
PICFLAG = -fPIC
LDFLAGS.EXTRA =
ifneq (undefined, $(origin GLEW_APPLE_GLX))

View File

@ -1,7 +1,8 @@
NAME = $(GLEW_NAME)
CC = cc
LD = cc
CFLAGS.EXTRA = -arch ppc -no-cpp-precomp -dynamic -fno-common
CFLAGS.EXTRA = -arch ppc -dynamic -fno-common
#CFLAGS.EXTRA += -no-cpp-precomp
PICFLAG = -fPIC
LDFLAGS.EXTRA = -arch ppc
ifneq (undefined, $(origin GLEW_APPLE_GLX))

View File

@ -1,7 +1,8 @@
NAME = $(GLEW_NAME)
CC = cc
LD = cc
CFLAGS.EXTRA = -arch x86_64 -no-cpp-precomp -dynamic -fno-common
CFLAGS.EXTRA = -arch x86_64 -dynamic -fno-common
#CFLAGS.EXTRA += -no-cpp-precomp
PICFLAG = -fPIC
LDFLAGS.EXTRA = -arch x86_64
ifneq (undefined, $(origin GLEW_APPLE_GLX))