mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-11 01:23:48 +00:00
Add build support for NaCL - Google Native Client.
This commit is contained in:
parent
2de0716a46
commit
287c58f930
6
Makefile
6
Makefile
@ -184,7 +184,13 @@ VISUALINFO.BIN.SRC := src/visualinfo.c
|
||||
VISUALINFO.BIN.OBJ := $(addprefix tmp/$(SYSTEM)/default/shared/,$(notdir $(VISUALINFO.BIN.SRC)))
|
||||
VISUALINFO.BIN.OBJ := $(VISUALINFO.BIN.OBJ:.c=.o)
|
||||
|
||||
# Don't build glewinfo or visualinfo for NaCL, yet.
|
||||
|
||||
ifneq ($(filter nacl%,$(SYSTEM)),)
|
||||
glew.bin: glew.lib bin
|
||||
else
|
||||
glew.bin: glew.lib bin bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN)
|
||||
endif
|
||||
|
||||
bin:
|
||||
mkdir bin
|
||||
|
@ -4,7 +4,7 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
#elif !defined(__ANDROID__) && !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
|
||||
#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
|
||||
|
||||
#if defined(GLEW_MX)
|
||||
GLboolean glxewContextIsSupported (const GLXEWContext* ctx, const char* name)
|
||||
|
36
config/Makefile.nacl-32
Normal file
36
config/Makefile.nacl-32
Normal file
@ -0,0 +1,36 @@
|
||||
NAME = $(REGAL_NAME)
|
||||
|
||||
M_PREFIX = i686
|
||||
M_NAME ?= $(shell uname -s)
|
||||
ifeq (Linux,${M_NAME})
|
||||
M_PREFIX = i686
|
||||
endif
|
||||
|
||||
CC = $(M_PREFIX)-nacl-gcc
|
||||
CXX = $(M_PREFIX)-nacl-g++
|
||||
LD = $(M_PREFIX)-nacl-ld
|
||||
STRIP ?=
|
||||
EXT.DYNAMIC = so
|
||||
LDFLAGS.EXTRA =
|
||||
LIBDIR =
|
||||
CFLAGS.EXTRA += -fPIC
|
||||
CFLAGS.EXTRA += -m32
|
||||
LDFLAGS.EXTRA += -melf_nacl
|
||||
LDFLAGS.GL =
|
||||
LDFLAGS.GLU = -lRegalGLU
|
||||
LDFLAGS.GLUT = -lRegalGLUT
|
||||
LDFLAGS.STATIC =
|
||||
LDFLAGS.DYNAMIC = -shared
|
||||
WARN = -Wall -W -Wno-unused-parameter
|
||||
POPT = -O2
|
||||
BIN.SUFFIX =
|
||||
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
|
||||
LIB.DEVLNK = lib$(NAME).so
|
||||
LIB.SHARED = lib$(NAME).so.$(SO_VERSION)
|
||||
LIB.STATIC = lib$(NAME).a
|
||||
LDFLAGS.SO = $(LDFLAGS.DYNAMIC) -soname=$(LIB.SONAME)
|
||||
LIB.SONAME.MX = lib$(NAME)mx.so.$(SO_MAJOR)
|
||||
LIB.DEVLNK.MX = lib$(NAME)mx.so
|
||||
LIB.SHARED.MX = lib$(NAME)mx.so.$(SO_VERSION)
|
||||
LIB.STATIC.MX = lib$(NAME)mx.a
|
||||
LDFLAGS.SO.MX = $(LDFLAGS.DYNAMIC) -soname=$(LIB.SONAME.MX)
|
36
config/Makefile.nacl-64
Normal file
36
config/Makefile.nacl-64
Normal file
@ -0,0 +1,36 @@
|
||||
NAME = $(REGAL_NAME)
|
||||
|
||||
M_PREFIX = i686
|
||||
M_NAME ?= $(shell uname -s)
|
||||
ifeq (Linux,${M_NAME})
|
||||
M_PREFIX = i686
|
||||
endif
|
||||
|
||||
CC = $(M_PREFIX)-nacl-gcc
|
||||
CXX = $(M_PREFIX)-nacl-g++
|
||||
LD = $(M_PREFIX)-nacl-ld
|
||||
STRIP ?=
|
||||
EXT.DYNAMIC = so
|
||||
LDFLAGS.EXTRA =
|
||||
LIBDIR =
|
||||
CFLAGS.EXTRA += -fPIC
|
||||
CFLAGS.EXTRA += -m64
|
||||
LDFLAGS.EXTRA += -melf64_nacl
|
||||
LDFLAGS.GL =
|
||||
LDFLAGS.GLU = -lRegalGLU
|
||||
LDFLAGS.GLUT = -lRegalGLUT
|
||||
LDFLAGS.STATIC =
|
||||
LDFLAGS.DYNAMIC = -shared
|
||||
WARN = -Wall -W -Wno-unused-parameter
|
||||
POPT = -O2
|
||||
BIN.SUFFIX =
|
||||
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
|
||||
LIB.DEVLNK = lib$(NAME).so
|
||||
LIB.SHARED = lib$(NAME).so.$(SO_VERSION)
|
||||
LIB.STATIC = lib$(NAME).a
|
||||
LDFLAGS.SO = $(LDFLAGS.DYNAMIC) -soname=$(LIB.SONAME)
|
||||
LIB.SONAME.MX = lib$(NAME)mx.so.$(SO_MAJOR)
|
||||
LIB.DEVLNK.MX = lib$(NAME)mx.so
|
||||
LIB.SHARED.MX = lib$(NAME)mx.so.$(SO_VERSION)
|
||||
LIB.STATIC.MX = lib$(NAME)mx.a
|
||||
LDFLAGS.SO.MX = $(LDFLAGS.DYNAMIC) -soname=$(LIB.SONAME.MX)
|
Loading…
Reference in New Issue
Block a user