2007-12-28 01:47:25 +00:00
|
|
|
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
|
|
|
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
2004-02-01 20:03:26 +00:00
|
|
|
##
|
|
|
|
## This program is distributed under the terms and conditions of the GNU
|
|
|
|
## General Public License Version 2 as published by the Free Software
|
|
|
|
## Foundation or, at your option, any later version.
|
2003-07-06 15:01:13 +00:00
|
|
|
|
2005-01-05 20:19:03 +00:00
|
|
|
include ../config/version
|
2003-07-06 15:01:13 +00:00
|
|
|
|
2005-05-16 04:14:15 +00:00
|
|
|
#GLEW_SPLIT_SOURCE = yes
|
|
|
|
|
2003-09-12 03:50:22 +00:00
|
|
|
SHELL = bash
|
2012-10-24 19:07:29 +00:00
|
|
|
|
2013-07-14 18:02:16 +00:00
|
|
|
### Use git repository for GL extension specifications
|
|
|
|
|
|
|
|
GIT_CLONE ?= git clone --branch glew https://github.com/nigels-com/glfixes.git
|
|
|
|
|
2012-10-24 19:07:29 +00:00
|
|
|
###
|
|
|
|
### Conventional desktop OpenGL settings
|
|
|
|
###
|
|
|
|
|
2013-07-14 18:02:16 +00:00
|
|
|
REGISTRY = registry/gl/specs
|
2012-10-24 19:07:29 +00:00
|
|
|
EXT = extensions/gl
|
|
|
|
FILTER = filter_gl_ext.sh
|
|
|
|
CORE = core/gl
|
2007-12-27 18:25:25 +00:00
|
|
|
REGISTRY_URL = http://www.opengl.org/registry/
|
2012-10-24 19:07:29 +00:00
|
|
|
|
|
|
|
###
|
|
|
|
### Experimental OpenGL ES settings
|
|
|
|
###
|
|
|
|
|
|
|
|
# REGISTRY = registry/gles
|
|
|
|
# EXT = extensions/gles
|
|
|
|
# FILTER = filter_gles_ext.sh
|
|
|
|
# CORE = core/gles
|
|
|
|
# REGISTRY_URL = http://www.khronos.org/registry/gles/
|
|
|
|
|
2003-09-12 03:50:22 +00:00
|
|
|
BIN = bin
|
|
|
|
SRC = src
|
|
|
|
BLACKLIST = blacklist
|
2003-07-06 15:01:13 +00:00
|
|
|
|
2004-12-31 08:50:04 +00:00
|
|
|
GL_CORE_SPEC := $(CORE)/GL_VERSION*
|
|
|
|
GLX_CORE_SPEC := $(CORE)/GLX_VERSION*
|
|
|
|
ifeq (custom,$(MAKECMDGOALS))
|
2013-07-14 18:02:16 +00:00
|
|
|
#GL_CORE_SPEC := $(shell grep GL_VERSION custom.txt | perl -pi -e "s=^=$(CORE)/=g;")
|
|
|
|
GL_EXT_SPEC := $(shell grep "^[ \t]*GL_" custom.txt | grep -v GL_VERSION | perl -pi -e "s=^=$(EXT)/=g;")
|
|
|
|
WGL_EXT_SPEC := $(shell grep "^[ \t]*WGL_" custom.txt | perl -pi -e "s=^=$(EXT)/=g;")
|
|
|
|
#GLX_CORE_SPEC := $(shell grep GLX_VERSION custom.txt | perl -pi -e "s=^=$(CORE)/=g;")
|
|
|
|
GLX_EXT_SPEC := $(shell grep "^[ \t]*GLX_" custom.txt | grep -v GLX_VERSION | perl -pi -e "s=^=$(EXT)/=g;")
|
2004-12-31 08:50:04 +00:00
|
|
|
else
|
|
|
|
GL_EXT_SPEC := $(EXT)/GL_*
|
|
|
|
WGL_EXT_SPEC := $(EXT)/WGL_*
|
2005-01-04 03:29:39 +00:00
|
|
|
GLX_EXT_SPEC := $(EXT)/GLX_*
|
2004-12-31 08:50:04 +00:00
|
|
|
endif
|
|
|
|
|
2003-09-12 03:50:22 +00:00
|
|
|
PARSE_SPEC = parse_spec.pl
|
2003-11-10 08:50:17 +00:00
|
|
|
SYSTEM = $(strip $(shell uname -s))
|
2003-09-12 03:50:22 +00:00
|
|
|
|
|
|
|
TOP = ..
|
|
|
|
I.DEST = $(TOP)/include/GL
|
|
|
|
S.DEST = $(TOP)/src
|
|
|
|
D.DEST = $(TOP)/doc
|
2012-07-18 03:06:18 +00:00
|
|
|
B.DEST = $(TOP)/build
|
2003-07-06 15:01:13 +00:00
|
|
|
|
2005-01-03 07:05:38 +00:00
|
|
|
I.TARGETS = \
|
|
|
|
$(I.DEST)/glew.h \
|
|
|
|
$(I.DEST)/wglew.h \
|
|
|
|
$(I.DEST)/glxew.h
|
2003-07-06 15:01:13 +00:00
|
|
|
|
2005-05-16 04:14:15 +00:00
|
|
|
ifeq (yes,$(GLEW_SPLIT_SOURCE))
|
|
|
|
S.TARGETS = \
|
|
|
|
$(S.DEST)/glew_def.c \
|
|
|
|
$(S.DEST)/glew_init.c \
|
|
|
|
$(S.DEST)/glew_str.c \
|
|
|
|
$(S.DEST)/glewinfo.c
|
|
|
|
else
|
2005-01-03 07:05:38 +00:00
|
|
|
S.TARGETS = \
|
|
|
|
$(S.DEST)/glew.c \
|
|
|
|
$(S.DEST)/glewinfo.c
|
2005-05-16 04:14:15 +00:00
|
|
|
endif
|
2005-01-03 07:05:38 +00:00
|
|
|
|
|
|
|
D.TARGETS = \
|
2009-12-31 00:05:15 +00:00
|
|
|
$(D.DEST)/index.html \
|
|
|
|
$(D.DEST)/install.html \
|
|
|
|
$(D.DEST)/basic.html \
|
|
|
|
$(D.DEST)/advanced.html \
|
2011-08-02 21:17:30 +00:00
|
|
|
$(D.DEST)/build.html \
|
2009-12-31 00:05:15 +00:00
|
|
|
$(D.DEST)/credits.html \
|
|
|
|
$(D.DEST)/log.html \
|
2005-01-03 07:05:38 +00:00
|
|
|
$(D.DEST)/glew.html \
|
|
|
|
$(D.DEST)/wglew.html \
|
|
|
|
$(D.DEST)/glxew.html
|
|
|
|
|
2005-01-30 01:48:06 +00:00
|
|
|
B.TARGETS = \
|
|
|
|
$(B.DEST)/glew.rc \
|
|
|
|
$(B.DEST)/glewinfo.rc \
|
|
|
|
$(B.DEST)/visualinfo.rc
|
|
|
|
|
2005-02-03 03:34:16 +00:00
|
|
|
all custom: $(I.TARGETS) $(S.TARGETS) $(D.TARGETS) $(B.TARGETS)
|
2005-01-30 01:48:06 +00:00
|
|
|
|
2003-09-15 15:35:32 +00:00
|
|
|
registry: $(REGISTRY)/.dummy
|
2003-07-06 15:01:13 +00:00
|
|
|
ext: $(EXT)/.dummy
|
|
|
|
|
2013-07-14 18:02:16 +00:00
|
|
|
$(REGISTRY)/.dummy:
|
2005-01-03 07:05:38 +00:00
|
|
|
@echo "--------------------------------------------------------------------"
|
|
|
|
@echo "Downloading registry"
|
|
|
|
@echo "--------------------------------------------------------------------"
|
2013-07-14 18:02:16 +00:00
|
|
|
$(GIT_CLONE) registry
|
2003-07-06 15:01:13 +00:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(EXT)/.dummy: $(REGISTRY)/.dummy
|
2005-01-03 07:05:38 +00:00
|
|
|
@echo "--------------------------------------------------------------------"
|
|
|
|
@echo "Creating descriptors"
|
|
|
|
@echo "--------------------------------------------------------------------"
|
2003-09-15 15:35:32 +00:00
|
|
|
rm -rf $(EXT)
|
2003-07-06 15:01:13 +00:00
|
|
|
$(BIN)/update_ext.sh $(EXT) $(REGISTRY) $(BLACKLIST)
|
2012-10-24 19:07:29 +00:00
|
|
|
$(BIN)/$(FILTER) $(EXT)
|
2003-11-10 08:50:17 +00:00
|
|
|
ifeq ($(patsubst Darwin%,Darwin,$(SYSTEM)), Darwin)
|
2004-02-05 23:14:59 +00:00
|
|
|
find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \
|
|
|
|
xargs -J % cp % $(EXT)
|
2003-11-10 08:50:17 +00:00
|
|
|
else
|
2004-02-05 23:14:59 +00:00
|
|
|
find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \
|
|
|
|
xargs cp --target-directory=$(EXT)
|
2003-11-10 08:50:17 +00:00
|
|
|
endif
|
2003-07-06 15:01:13 +00:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(I.DEST)/glew.h: $(EXT)/.dummy
|
2005-01-03 07:05:38 +00:00
|
|
|
@echo "--------------------------------------------------------------------"
|
|
|
|
@echo "Creating glew.h"
|
|
|
|
@echo "--------------------------------------------------------------------"
|
2003-07-06 15:05:35 +00:00
|
|
|
test -d $(I.DEST) || mkdir -p $(I.DEST)
|
2005-01-03 07:05:38 +00:00
|
|
|
cp -f $(SRC)/glew_license.h $@
|
2007-11-14 04:31:28 +00:00
|
|
|
cat $(SRC)/mesa_license.h >> $@
|
|
|
|
cat $(SRC)/khronos_license.h >> $@
|
2005-01-03 07:05:38 +00:00
|
|
|
cat $(SRC)/glew_head.h >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_header.pl GLAPIENTRY GL $(GL_CORE_SPEC) >> $@
|
|
|
|
$(BIN)/make_header.pl GLAPIENTRY GL $(GL_EXT_SPEC) >> $@
|
2004-05-09 09:02:12 +00:00
|
|
|
echo -e "/* ------------------------------------------------------------------------- */\n\n#if defined(GLEW_MX) && defined(_WIN32)\n#define GLEW_FUN_EXPORT\n#else\n#define GLEW_FUN_EXPORT GLEWAPI\n#endif /* GLEW_MX */\n" >> $@
|
|
|
|
echo -e "#if defined(GLEW_MX)\n#define GLEW_VAR_EXPORT\n#else\n#define GLEW_VAR_EXPORT GLEWAPI\n#endif /* GLEW_MX */\n" >> $@
|
|
|
|
echo -e "#if defined(GLEW_MX) && defined(_WIN32)\nstruct GLEWContextStruct\n{\n#endif /* GLEW_MX */" >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_struct_fun.pl GLEW_FUN_EXPORT $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
|
2004-02-19 17:53:59 +00:00
|
|
|
echo -e "\n#if defined(GLEW_MX) && !defined(_WIN32)\nstruct GLEWContextStruct\n{\n#endif /* GLEW_MX */\n" >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_struct_var.pl GLEW_VAR_EXPORT $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
|
2004-02-19 17:53:59 +00:00
|
|
|
echo -e "\n#ifdef GLEW_MX\n}; /* GLEWContextStruct */\n#endif /* GLEW_MX */\n" >> $@
|
2013-07-14 18:02:16 +00:00
|
|
|
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 $@
|
2004-02-01 18:13:05 +00:00
|
|
|
rm -f $@.bak
|
2004-12-29 05:43:35 +00:00
|
|
|
cat $(SRC)/glew_tail.h >> $@
|
2003-07-06 15:01:13 +00:00
|
|
|
|
|
|
|
$(I.DEST)/wglew.h: $(EXT)/.dummy
|
2005-01-03 07:05:38 +00:00
|
|
|
@echo "--------------------------------------------------------------------"
|
|
|
|
@echo "Creating wglew.h"
|
|
|
|
@echo "--------------------------------------------------------------------"
|
|
|
|
cp -f $(SRC)/glew_license.h $@
|
2007-11-14 04:31:28 +00:00
|
|
|
cat $(SRC)/khronos_license.h >> $@
|
2005-01-03 07:05:38 +00:00
|
|
|
cat $(SRC)/wglew_head.h >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_header.pl WINAPI WGL $(WGL_EXT_SPEC) >> $@
|
2012-05-05 04:25:23 +00:00
|
|
|
cat $(SRC)/wglew_mid.h >> $@
|
|
|
|
echo -e "\n#ifdef GLEW_MX\nstruct WGLEWContextStruct\n{\n#endif /* GLEW_MX */" >> $@
|
2012-05-05 04:36:14 +00:00
|
|
|
$(BIN)/make_struct_fun.pl WGLEW_FUN_EXPORT $(WGL_EXT_SPEC) >> $@
|
|
|
|
$(BIN)/make_struct_var.pl WGLEW_VAR_EXPORT $(WGL_EXT_SPEC) >> $@
|
2004-02-19 17:53:59 +00:00
|
|
|
echo -e "\n#ifdef GLEW_MX\n}; /* WGLEWContextStruct */\n#endif /* GLEW_MX */\n" >> $@
|
2004-12-29 05:43:35 +00:00
|
|
|
cat $(SRC)/wglew_tail.h >> $@
|
2003-07-06 15:01:13 +00:00
|
|
|
|
|
|
|
$(I.DEST)/glxew.h: $(EXT)/.dummy
|
2005-01-03 07:05:38 +00:00
|
|
|
@echo "--------------------------------------------------------------------"
|
|
|
|
@echo "Creating glxew.h"
|
|
|
|
@echo "--------------------------------------------------------------------"
|
|
|
|
cp -f $(SRC)/glew_license.h $@
|
2007-11-14 04:31:28 +00:00
|
|
|
cat $(SRC)/mesa_license.h >> $@
|
|
|
|
cat $(SRC)/khronos_license.h >> $@
|
2005-01-03 07:05:38 +00:00
|
|
|
cat $(SRC)/glxew_head.h >> $@
|
2013-07-14 18:02:16 +00:00
|
|
|
$(BIN)/make_header.pl "" GLX $(GLX_CORE_SPEC) >> $@
|
|
|
|
$(BIN)/make_header.pl "" GLX $(GLX_EXT_SPEC) >> $@
|
2012-05-05 04:25:23 +00:00
|
|
|
cat $(SRC)/glxew_mid.h >> $@
|
2012-05-05 04:36:14 +00:00
|
|
|
$(BIN)/make_struct_fun.pl GLXEW_FUN_EXPORT $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
|
2004-02-19 17:53:59 +00:00
|
|
|
echo -e "\n#if defined(GLEW_MX)\nstruct GLXEWContextStruct\n{\n#endif /* GLEW_MX */\n" >> $@
|
2012-05-05 04:36:14 +00:00
|
|
|
$(BIN)/make_struct_var.pl GLXEW_VAR_EXPORT $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
|
2004-02-19 17:53:59 +00:00
|
|
|
echo -e "\n#ifdef GLEW_MX\n}; /* GLXEWContextStruct */\n#endif /* GLEW_MX */\n" >> $@
|
2013-07-14 18:02:16 +00:00
|
|
|
perl -e "s/GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;/GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_0;\nGLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_1;\nGLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;/" -pi $@
|
2004-12-29 05:43:35 +00:00
|
|
|
cat $(SRC)/glxew_tail.h >> $@
|
2003-07-06 15:01:13 +00:00
|
|
|
|
2005-01-03 07:05:38 +00:00
|
|
|
$(S.DEST)/glew.c: $(EXT)/.dummy
|
|
|
|
@echo "--------------------------------------------------------------------"
|
|
|
|
@echo "Creating glew.c"
|
|
|
|
@echo "--------------------------------------------------------------------"
|
|
|
|
cp -f $(SRC)/glew_license.h $@
|
|
|
|
cat $(SRC)/glew_head.c >> $@
|
|
|
|
echo -e "\n#if !defined(_WIN32) || !defined(GLEW_MX)" >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_def_fun.pl GL $(GL_CORE_SPEC) >> $@
|
|
|
|
$(BIN)/make_def_fun.pl GL $(GL_EXT_SPEC) >> $@
|
2005-01-03 07:05:38 +00:00
|
|
|
echo -e "\n#endif /* !WIN32 || !GLEW_MX */" >> $@
|
|
|
|
echo -e "\n#if !defined(GLEW_MX)" >> $@;
|
|
|
|
echo -e "\nGLboolean __GLEW_VERSION_1_1 = GL_FALSE;" >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_def_var.pl GL $(GL_CORE_SPEC) >> $@
|
|
|
|
$(BIN)/make_def_var.pl GL $(GL_EXT_SPEC) >> $@
|
2005-01-03 07:05:38 +00:00
|
|
|
echo -e "\n#endif /* !GLEW_MX */\n" >> $@;
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_init.pl GL $(GL_CORE_SPEC) >> $@
|
|
|
|
$(BIN)/make_init.pl GL $(GL_EXT_SPEC) >> $@
|
2005-01-03 07:05:38 +00:00
|
|
|
cat $(SRC)/glew_init_gl.c >> $@
|
2013-07-21 03:06:29 +00:00
|
|
|
$(BIN)/make_list.pl $(GL_CORE_SPEC) | grep -v '\"GL_VERSION' >> $@
|
|
|
|
$(BIN)/make_list.pl $(GL_EXT_SPEC) >> $@
|
2005-01-03 07:05:38 +00:00
|
|
|
echo -e "\n return GLEW_OK;\n}\n" >> $@
|
|
|
|
echo -e "\n#if defined(_WIN32)" >> $@
|
|
|
|
echo -e "\n#if !defined(GLEW_MX)" >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_def_fun.pl WGL $(WGL_EXT_SPEC) >> $@
|
|
|
|
$(BIN)/make_def_var.pl WGL $(WGL_EXT_SPEC) >> $@
|
2005-01-03 07:05:38 +00:00
|
|
|
echo -e "\n#endif /* !GLEW_MX */\n" >> $@;
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_init.pl WGL $(WGL_EXT_SPEC) >> $@
|
2005-01-03 07:05:38 +00:00
|
|
|
cat $(SRC)/glew_init_wgl.c >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_list.pl $(WGL_EXT_SPEC) >> $@
|
2005-01-03 07:05:38 +00:00
|
|
|
echo -e "\n return GLEW_OK;\n}" >> $@;
|
2012-08-16 19:01:11 +00:00
|
|
|
echo -e "\n#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))" >> $@
|
2005-01-03 07:05:38 +00:00
|
|
|
$(BIN)/make_def_fun.pl GLX $(GLX_CORE_SPEC) >> $@
|
|
|
|
$(BIN)/make_def_fun.pl GLX $(GLX_EXT_SPEC) >> $@
|
|
|
|
echo -e "\n#if !defined(GLEW_MX)" >> $@;
|
|
|
|
echo -e "\nGLboolean __GLXEW_VERSION_1_0 = GL_FALSE;" >> $@
|
|
|
|
echo -e "GLboolean __GLXEW_VERSION_1_1 = GL_FALSE;" >> $@
|
|
|
|
$(BIN)/make_def_var.pl GLX $(GLX_CORE_SPEC) >> $@
|
|
|
|
$(BIN)/make_def_var.pl GLX $(GLX_EXT_SPEC) >> $@
|
|
|
|
echo -e "\n#endif /* !GLEW_MX */\n" >> $@;
|
|
|
|
$(BIN)/make_init.pl GLX $(GLX_CORE_SPEC) >> $@
|
|
|
|
$(BIN)/make_init.pl GLX $(GLX_EXT_SPEC) >> $@
|
|
|
|
cat $(SRC)/glew_init_glx.c >> $@
|
|
|
|
$(BIN)/make_list.pl $(CORE)/GLX_VERSION_1_3 | grep -v '\"GLX_VERSION' >> $@
|
|
|
|
$(BIN)/make_list.pl $(GLX_EXT_SPEC) >> $@
|
|
|
|
echo -e "\n return GLEW_OK;\n}" >> $@
|
2012-08-16 19:01:11 +00:00
|
|
|
echo -e "\n#endif /* !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */\n" >> $@;
|
2005-01-03 07:05:38 +00:00
|
|
|
cat $(SRC)/glew_init_tail.c >> $@
|
|
|
|
cat $(SRC)/glew_str_head.c >> $@
|
|
|
|
$(BIN)/make_str.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
|
|
|
|
cat $(SRC)/glew_str_wgl.c >> $@
|
|
|
|
$(BIN)/make_str.pl $(WGL_EXT_SPEC) >> $@
|
|
|
|
cat $(SRC)/glew_str_glx.c >> $@
|
|
|
|
$(BIN)/make_str.pl $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
|
|
|
|
cat $(SRC)/glew_str_tail.c >> $@
|
2005-01-05 20:19:03 +00:00
|
|
|
perl -e "s/GLEW_VERSION_STRING/$(GLEW_VERSION)/g" -pi $@
|
2007-12-28 00:24:07 +00:00
|
|
|
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 $@
|
2005-01-03 07:05:38 +00:00
|
|
|
perl -e "s/GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader\(GLEW_CONTEXT_ARG_VAR_INIT\);/{ GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader(GLEW_CONTEXT_ARG_VAR_INIT); _glewInit_GL_ARB_vertex_program(GLEW_CONTEXT_ARG_VAR_INIT); }/g" -pi $@
|
2006-03-02 06:51:14 +00:00
|
|
|
perl -e "s/\(\(glColorSubTable = /((glBlendEquation = (PFNGLBLENDEQUATIONPROC)glewGetProcAddress((const GLubyte*)\"glBlendEquation\")) == NULL) || r;\n r = ((glColorSubTable = /g" -pi $@
|
2004-12-29 05:43:35 +00:00
|
|
|
rm -f $@.bak
|
|
|
|
|
2005-01-03 07:05:38 +00:00
|
|
|
$(S.DEST)/glew_def.c: $(EXT)/.dummy
|
|
|
|
cp -f $(SRC)/glew_license.h $@
|
|
|
|
echo -e "#include \"glew_utils.h\"\n\n#if !defined(_WIN32) || !defined(GLEW_MX)" >> $@
|
|
|
|
$(BIN)/make_def_fun.pl GL $(GL_CORE_SPEC) >> $@
|
|
|
|
$(BIN)/make_def_fun.pl GL $(GL_EXT_SPEC) >> $@
|
|
|
|
echo -e "\n#endif /* !WIN32 || !GLEW_MX */" >> $@
|
|
|
|
echo -e "\n#if !defined(GLEW_MX)\n\nGLboolean __GLEW_VERSION_1_1 = GL_FALSE;" >> $@
|
|
|
|
$(BIN)/make_def_var.pl GL $(GL_CORE_SPEC) >> $@
|
|
|
|
$(BIN)/make_def_var.pl GL $(GL_EXT_SPEC) >> $@
|
|
|
|
echo -e "\n#if defined(_WIN32)" >> $@
|
|
|
|
$(BIN)/make_def_fun.pl WGL $(WGL_EXT_SPEC) >> $@
|
|
|
|
$(BIN)/make_def_var.pl WGL $(WGL_EXT_SPEC) >> $@
|
|
|
|
echo -e "\n#endif /* _WIN32 */" >> $@
|
|
|
|
echo -e "\n#endif /* !GLEW_MX */" >> $@;
|
2012-08-16 19:01:11 +00:00
|
|
|
echo -e "\n#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))" >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_def_fun.pl GLX $(GLX_CORE_SPEC) >> $@
|
|
|
|
$(BIN)/make_def_fun.pl GLX $(GLX_EXT_SPEC) >> $@
|
2005-01-03 07:05:38 +00:00
|
|
|
echo -e "\n#if !defined(GLEW_MX)" >> $@;
|
|
|
|
echo -e "\nGLboolean __GLXEW_VERSION_1_0 = GL_FALSE;" >> $@
|
|
|
|
echo -e "GLboolean __GLXEW_VERSION_1_1 = GL_FALSE;" >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_def_var.pl GLX $(GLX_CORE_SPEC) >> $@
|
|
|
|
$(BIN)/make_def_var.pl GLX $(GLX_EXT_SPEC) >> $@
|
2005-01-03 07:05:38 +00:00
|
|
|
echo -e "\n#endif /* !GLEW_MX */" >> $@;
|
2012-08-16 19:01:11 +00:00
|
|
|
echo -e "\n#endif /* !defined(_WIN32) && !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */" >> $@;
|
2005-01-03 07:05:38 +00:00
|
|
|
rm -f $@.bak
|
|
|
|
|
|
|
|
$(S.DEST)/glew_init.c: $(EXT)/.dummy
|
|
|
|
cp -f $(SRC)/glew_license.h $@
|
|
|
|
echo -e "#include \"glew_utils.h\"\n" >> $@
|
|
|
|
$(BIN)/make_init.pl GL $(GL_CORE_SPEC) >> $@
|
|
|
|
$(BIN)/make_init.pl GL $(GL_EXT_SPEC) >> $@
|
|
|
|
cat $(SRC)/glew_init_gl.c >> $@
|
|
|
|
$(BIN)/make_list.pl $(GL_CORE_SPEC) | grep -v '\"GL_VERSION' >> $@
|
|
|
|
$(BIN)/make_list.pl $(GL_EXT_SPEC) >> $@
|
|
|
|
echo -e "\n return GLEW_OK;\n}\n\n#if defined(_WIN32)\n" >> $@;
|
|
|
|
$(BIN)/make_init.pl WGL $(WGL_EXT_SPEC) >> $@
|
|
|
|
cat $(SRC)/glew_init_wgl.c >> $@
|
|
|
|
$(BIN)/make_list.pl $(WGL_EXT_SPEC) >> $@
|
|
|
|
echo -e "\n return GLEW_OK;\n}\n\n" >> $@;
|
|
|
|
echo -e "\n#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)\n" >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_init.pl GLX $(GLX_CORE_SPEC) >> $@
|
|
|
|
$(BIN)/make_init.pl GLX $(GLX_EXT_SPEC) >> $@
|
2005-01-03 07:05:38 +00:00
|
|
|
cat $(SRC)/glew_init_glx.c >> $@
|
2003-07-06 15:01:13 +00:00
|
|
|
$(BIN)/make_list.pl $(CORE)/GLX_VERSION_1_3 | grep -v '\"GLX_VERSION' >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_list.pl $(GLX_EXT_SPEC) >> $@
|
2005-01-03 07:05:38 +00:00
|
|
|
echo -e "\n return GLEW_OK;\n}\n\n#endif /* !__APPLE__ || GLEW_APPLE_GLX */\n" >> $@;
|
|
|
|
cat $(SRC)/glew_init_tail.c >> $@
|
2005-01-05 20:19:03 +00:00
|
|
|
perl -e "s/GLEW_VERSION_STRING/$(GLEW_VERSION)/g" -pi $@
|
2007-12-28 00:24:07 +00:00
|
|
|
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 $@
|
2005-01-03 07:05:38 +00:00
|
|
|
perl -e "s/GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader\(GLEW_CONTEXT_ARG_VAR_INIT\);/{ GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader(GLEW_CONTEXT_ARG_VAR_INIT); _glewInit_GL_ARB_vertex_program(GLEW_CONTEXT_ARG_VAR_INIT); }/g" -pi $@
|
2006-02-26 16:45:12 +00:00
|
|
|
perl -e "s/\(\(glBlendColor = /((glBlendEquation = (PFNGLBLENDEQUATIONPROC)glewGetProcAddress((const GLubyte*)\"glBlendEquation\")) == NULL) || r;\n r = ((glBlendColor = /g" -pi $@
|
2004-01-13 18:59:49 +00:00
|
|
|
rm -f $@.bak
|
2003-07-06 15:01:13 +00:00
|
|
|
|
2004-12-29 05:43:35 +00:00
|
|
|
$(S.DEST)/glew_str.c: $(EXT)/.dummy
|
2005-01-03 07:05:38 +00:00
|
|
|
cp -f $(SRC)/glew_license.h $@
|
|
|
|
echo -e "\n#include \"glew_utils.h\"\n" >> $@
|
|
|
|
cat $(SRC)/glew_str_head.c >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_str.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
|
2004-12-29 05:43:35 +00:00
|
|
|
cat $(SRC)/glew_str_wgl.c >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_str.pl $(WGL_EXT_SPEC) >> $@
|
2004-12-29 05:43:35 +00:00
|
|
|
cat $(SRC)/glew_str_glx.c >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_str.pl $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
|
2004-12-29 05:43:35 +00:00
|
|
|
cat $(SRC)/glew_str_tail.c >> $@
|
2005-01-05 20:19:03 +00:00
|
|
|
# perl -e "s/GLEW_VERSION_STRING/$(GLEW_VERSION)/g" -pi $@
|
2004-12-29 05:43:35 +00:00
|
|
|
# perl -e "s/GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader\(GLEW_CONTEXT_ARG_VAR_INIT\);/{ GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader(GLEW_CONTEXT_ARG_VAR_INIT); _glewInit_GL_ARB_vertex_program(GLEW_CONTEXT_ARG_VAR_INIT); }/g" -pi $@
|
|
|
|
rm -f $@.bak
|
|
|
|
|
2003-07-06 15:01:13 +00:00
|
|
|
$(S.DEST)/glewinfo.c: $(EXT)/.dummy
|
2005-01-03 07:05:38 +00:00
|
|
|
@echo "--------------------------------------------------------------------"
|
|
|
|
@echo "Creating glewinfo.c"
|
|
|
|
@echo "--------------------------------------------------------------------"
|
|
|
|
cp -f $(SRC)/glew_license.h $@
|
|
|
|
cat $(SRC)/glewinfo_head.c >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_info.pl $(GL_CORE_SPEC) >> $@
|
|
|
|
$(BIN)/make_info.pl $(GL_EXT_SPEC) >> $@
|
2003-07-06 15:01:13 +00:00
|
|
|
echo -e "#ifdef _WIN32\n" >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_info.pl $(WGL_EXT_SPEC) >> $@
|
2003-07-06 15:01:13 +00:00
|
|
|
echo -e "#else /* _UNIX */\n" >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_info.pl $(GLX_CORE_SPEC) >> $@
|
|
|
|
$(BIN)/make_info.pl $(GLX_EXT_SPEC) >> $@
|
2003-07-06 15:01:13 +00:00
|
|
|
echo -e "#endif /* _WIN32 */\n" >> $@
|
|
|
|
|
|
|
|
cat $(SRC)/glewinfo_gl.c >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_info_list.pl $(GL_CORE_SPEC) >> $@
|
|
|
|
$(BIN)/make_info_list.pl $(GL_EXT_SPEC) >> $@
|
2003-07-06 15:01:13 +00:00
|
|
|
cat $(SRC)/glewinfo_wgl.c >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_info_list.pl $(WGL_EXT_SPEC) >> $@
|
2003-07-06 15:01:13 +00:00
|
|
|
cat $(SRC)/glewinfo_glx.c >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_info_list.pl $(GLX_CORE_SPEC) >> $@
|
|
|
|
$(BIN)/make_info_list.pl $(GLX_EXT_SPEC) >> $@
|
2004-12-29 05:43:35 +00:00
|
|
|
cat $(SRC)/glewinfo_tail.c >> $@
|
2006-03-02 06:51:14 +00:00
|
|
|
perl -e 's/"glColorSubTable"/"glBlendEquation", glBlendEquation == NULL);\n glewInfoFunc("glColorSubTable"/g' -pi $@
|
2007-03-01 04:11:47 +00:00
|
|
|
rm -f $@.bak
|
2003-07-06 15:01:13 +00:00
|
|
|
|
2009-12-31 00:05:15 +00:00
|
|
|
# Update documentation
|
|
|
|
|
|
|
|
$(D.DEST)/%.html: doc/%.html
|
|
|
|
@echo "--------------------------------------------------------------------"
|
|
|
|
@echo "Creating $(@F)"
|
|
|
|
@echo "--------------------------------------------------------------------"
|
|
|
|
cat $(SRC)/header.html $< $(SRC)/footer.html | \
|
2011-04-27 15:42:44 +00:00
|
|
|
perl -pe 's#<a href="$(@F)">(.*)</a>#\1#' > $@
|
2009-12-31 00:05:15 +00:00
|
|
|
|
2003-07-08 16:43:30 +00:00
|
|
|
$(D.DEST)/glew.html: $(EXT)/.dummy
|
2005-01-03 07:05:38 +00:00
|
|
|
@echo "--------------------------------------------------------------------"
|
|
|
|
@echo "Creating glew.html"
|
|
|
|
@echo "--------------------------------------------------------------------"
|
2009-12-31 00:05:15 +00:00
|
|
|
cp -f $(SRC)/header.html $@
|
2005-01-03 07:05:38 +00:00
|
|
|
echo -e "<h2>Supported OpenGL Extensions</h2>\n" >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_html.pl $(GL_EXT_SPEC) >> $@
|
2009-12-31 00:05:15 +00:00
|
|
|
cat $(SRC)/footer.html >> $@
|
2011-04-27 15:42:44 +00:00
|
|
|
perl -i -pe 's#<a href="$(@F)">(.*)</a>#\1#' $@
|
2003-07-08 16:43:30 +00:00
|
|
|
|
|
|
|
$(D.DEST)/wglew.html: $(EXT)/.dummy
|
2005-01-03 07:05:38 +00:00
|
|
|
@echo "--------------------------------------------------------------------"
|
|
|
|
@echo "Creating wglew.html"
|
|
|
|
@echo "--------------------------------------------------------------------"
|
2009-12-31 00:05:15 +00:00
|
|
|
cp -f $(SRC)/header.html $@
|
2005-01-03 07:05:38 +00:00
|
|
|
echo -e "<h2>Supported WGL Extensions</h2>\n" >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_html.pl $(WGL_EXT_SPEC) >> $@
|
2009-12-31 00:05:15 +00:00
|
|
|
cat $(SRC)/footer.html >> $@
|
2011-04-27 15:42:44 +00:00
|
|
|
perl -i -pe 's#<a href="$(@F)">(.*)</a>#\1#' $@
|
2003-07-08 16:43:30 +00:00
|
|
|
|
|
|
|
$(D.DEST)/glxew.html: $(EXT)/.dummy
|
2005-01-03 07:05:38 +00:00
|
|
|
@echo "--------------------------------------------------------------------"
|
|
|
|
@echo "Creating glxew.html"
|
|
|
|
@echo "--------------------------------------------------------------------"
|
2009-12-31 00:05:15 +00:00
|
|
|
cp -f $(SRC)/header.html $@
|
2005-01-03 07:05:38 +00:00
|
|
|
echo -e "<h2>Supported GLX Extensions</h2>\n" >> $@
|
2004-12-31 08:50:04 +00:00
|
|
|
$(BIN)/make_html.pl $(GLX_EXT_SPEC) >> $@
|
2009-12-31 00:05:15 +00:00
|
|
|
cat $(SRC)/footer.html >> $@
|
2011-04-27 15:42:44 +00:00
|
|
|
perl -i -pe 's#<a href="$(@F)">(.*)</a>#\1#' $@
|
2003-07-08 16:43:30 +00:00
|
|
|
|
2005-01-30 01:48:06 +00:00
|
|
|
$(B.DEST)/%.rc: src/%.rc $(EXT)/.dummy
|
|
|
|
perl -e "s/GLEW_MAJOR/$(GLEW_MAJOR)/g;s/GLEW_MINOR/$(GLEW_MINOR)/g;s/GLEW_MICRO/$(GLEW_MICRO)/g;" -p $< > $@
|
|
|
|
|
2003-07-06 15:01:13 +00:00
|
|
|
clean:
|
2005-02-03 03:34:16 +00:00
|
|
|
rm -rf $(I.TARGETS) $(S.TARGETS) $(D.TARGETS) $(B.TARGETS)
|
2003-07-06 15:01:13 +00:00
|
|
|
|
|
|
|
clobber: clean
|
2005-01-03 07:05:38 +00:00
|
|
|
rm -rf $(EXT)
|
|
|
|
|
|
|
|
destroy: clobber
|
2013-07-14 18:02:16 +00:00
|
|
|
rm -rf registry
|