Build GLEW for all platforms
Whether it actually should be used or not on some particular platform is another thing that remains to be seen. But I think it should be buildable for all? Don't build the glew programs for non-desktop platforms. Build only static libraries when DISABLE_DYNLOADING. No AGL framework, and it's OpenGLES, not OpenGL, on iOS. Change-Id: Idf3aad341c4f270952db2039d5a5e421f39e728f
This commit is contained in:
2
external/glew/ExternalProject_glew.mk
vendored
2
external/glew/ExternalProject_glew.mk
vendored
@@ -25,7 +25,7 @@ else
|
||||
$(call gb_ExternalProject_get_state_target,glew,build) :
|
||||
$(call gb_ExternalProject_run,glew,\
|
||||
$(if $(filter TRUE,$(ENABLE_DEBUG)),STRIP=) LD="$(CC)" \
|
||||
$(MAKE) glew.lib $(if $(filter TRUE,$(ENABLE_DEBUG)),debug) \
|
||||
$(MAKE) glew.lib $(if $(filter DESKTOP,$(BUILD_TYPE)),$(if $(filter TRUE,$(ENABLE_DEBUG)),debug)) \
|
||||
)
|
||||
|
||||
endif
|
||||
|
4
external/glew/Module_glew.mk
vendored
4
external/glew/Module_glew.mk
vendored
@@ -9,14 +9,10 @@
|
||||
|
||||
$(eval $(call gb_Module_Module,glew))
|
||||
|
||||
ifeq ($(CROSS_COMPILING),)
|
||||
|
||||
$(eval $(call gb_Module_add_targets,glew,\
|
||||
ExternalProject_glew \
|
||||
UnpackedTarball_glew \
|
||||
ExternalPackage_glew \
|
||||
))
|
||||
|
||||
endif
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
16
external/glew/UnpackedTarball_glew.mk
vendored
16
external/glew/UnpackedTarball_glew.mk
vendored
@@ -13,6 +13,10 @@ $(eval $(call gb_UnpackedTarball_set_tarball,glew,$(GLEW_TARBALL)))
|
||||
|
||||
$(eval $(call gb_UnpackedTarball_set_patchlevel,glew,0))
|
||||
|
||||
$(eval $(call gb_UnpackedTarball_fix_end_of_line,glew,\
|
||||
Makefile \
|
||||
))
|
||||
|
||||
ifeq ($(OS)$(COM),WNTMSC)
|
||||
$(eval $(call gb_UnpackedTarball_set_patchflags,glew,--binary))
|
||||
$(eval $(call gb_UnpackedTarball_add_patches,glew,\
|
||||
@@ -31,4 +35,16 @@ $(eval $(call gb_UnpackedTarball_add_patches,glew,\
|
||||
))
|
||||
endif
|
||||
|
||||
ifeq ($(OS),IOS)
|
||||
$(eval $(call gb_UnpackedTarball_add_patches,glew,\
|
||||
external/glew/glew-ios.patch.1 \
|
||||
))
|
||||
endif
|
||||
|
||||
ifeq ($(DISABLE_DYNLOADING),TRUE)
|
||||
$(eval $(call gb_UnpackedTarball_add_patches,glew,\
|
||||
external/glew/glew-static-only.patch.1 \
|
||||
))
|
||||
endif
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
12
external/glew/glew-ios.patch.1
vendored
Normal file
12
external/glew/glew-ios.patch.1
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
-*- Mode:Diff -*-
|
||||
--- glew/config/Makefile.darwin
|
||||
+++ glew/config/Makefile.darwin
|
||||
@@ -8,7 +8,7 @@
|
||||
CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
|
||||
LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11
|
||||
else
|
||||
-LDFLAGS.GL = -framework AGL -framework OpenGL
|
||||
+LDFLAGS.GL = -framework OpenGLES
|
||||
endif
|
||||
LDFLAGS.STATIC =
|
||||
LDFLAGS.DYNAMIC =
|
12
external/glew/glew-static-only.patch.1
vendored
Normal file
12
external/glew/glew-static-only.patch.1
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
-*- Mode:Diff -*-
|
||||
--- glew/Makefile
|
||||
+++ glew/Makefile
|
||||
@@ -93,7 +93,7 @@
|
||||
LIB.SOBJS.MX := $(addprefix tmp/$(SYSTEM)/mx/shared/,$(LIB.SRCS.NAMES))
|
||||
LIB.SOBJS.MX := $(LIB.SOBJS.MX:.c=.o)
|
||||
|
||||
-glew.lib: lib lib/$(LIB.SHARED) lib/$(LIB.STATIC) glew.pc
|
||||
+glew.lib: lib lib/$(LIB.STATIC)
|
||||
|
||||
lib:
|
||||
mkdir lib
|
Reference in New Issue
Block a user