From fb2399680214d084f2a257c166ed95423d389ef4 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Fri, 4 May 2012 23:25:23 -0500 Subject: [PATCH] Move the GLXEW_EXPORT and WGLEW_EXPORT logic into src/glxew_mid.h and src/wglew_mid.h --- auto/Makefile | 5 +++-- auto/src/glxew_mid.h | 7 +++++++ auto/src/wglew_mid.h | 7 +++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 auto/src/glxew_mid.h create mode 100644 auto/src/wglew_mid.h diff --git a/auto/Makefile b/auto/Makefile index 5463583..1a54d4a 100644 --- a/auto/Makefile +++ b/auto/Makefile @@ -133,7 +133,8 @@ $(I.DEST)/wglew.h: $(EXT)/.dummy cat $(SRC)/khronos_license.h >> $@ 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 */" >> $@ + cat $(SRC)/wglew_mid.h >> $@ + echo -e "\n#ifdef GLEW_MX\nstruct WGLEWContextStruct\n{\n#endif /* GLEW_MX */" >> $@ $(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" >> $@ @@ -149,7 +150,7 @@ $(I.DEST)/glxew.h: $(EXT)/.dummy cat $(SRC)/glxew_head.h >> $@ $(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 */" >> $@ + cat $(SRC)/glxew_mid.h >> $@ $(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 GLEW_VAR_EXPORT $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@ diff --git a/auto/src/glxew_mid.h b/auto/src/glxew_mid.h new file mode 100644 index 0000000..040fc3d --- /dev/null +++ b/auto/src/glxew_mid.h @@ -0,0 +1,7 @@ +/* ------------------------------------------------------------------------- */ + +#ifdef GLEW_MX +#define GLXEW_EXPORT +#else +#define GLXEW_EXPORT extern +#endif /* GLEW_MX */ diff --git a/auto/src/wglew_mid.h b/auto/src/wglew_mid.h new file mode 100644 index 0000000..25c884e --- /dev/null +++ b/auto/src/wglew_mid.h @@ -0,0 +1,7 @@ +/* ------------------------------------------------------------------------- */ + +#ifdef GLEW_MX +#define WGLEW_EXPORT +#else +#define WGLEW_EXPORT GLEWAPI +#endif /* GLEW_MX */