diff --git a/Makefile b/Makefile index a4fe9ce..8c67a95 100644 --- a/Makefile +++ b/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 diff --git a/auto/src/glew_str_glx.c b/auto/src/glew_str_glx.c index ea2ba36..f6ddc6c 100644 --- a/auto/src/glew_str_glx.c +++ b/auto/src/glew_str_glx.c @@ -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) diff --git a/config/Makefile.nacl-32 b/config/Makefile.nacl-32 new file mode 100644 index 0000000..2a5cec7 --- /dev/null +++ b/config/Makefile.nacl-32 @@ -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) diff --git a/config/Makefile.nacl-64 b/config/Makefile.nacl-64 new file mode 100644 index 0000000..37cb6e9 --- /dev/null +++ b/config/Makefile.nacl-64 @@ -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)