Use -fPIC for Linux and Darwin builds.

See: https://bugs.launchpad.net/ubuntu/+source/glew/+bug/811789
This commit is contained in:
Nigel Stewart 2012-08-07 21:54:20 -05:00
parent 60e85a9815
commit 0a04f18c01
7 changed files with 8 additions and 8 deletions

View File

@ -121,7 +121,7 @@ tmp/$(SYSTEM)/default/static/glew.o: src/glew.c include/GL/glew.h include/GL/wgl
tmp/$(SYSTEM)/default/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
@mkdir -p $(dir $@)
$(CC) -DGLEW_NO_GLU $(CFLAGS) $(PICFLAG) $(CFLAGS.SO) -o $@ -c $<
$(CC) -DGLEW_NO_GLU $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
glew.pc: glew.pc.in
sed \
@ -157,7 +157,7 @@ tmp/$(SYSTEM)/mx/static/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h
tmp/$(SYSTEM)/mx/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
@mkdir -p $(dir $@)
$(CC) -DGLEW_NO_GLU -DGLEW_MX $(CFLAGS) $(PICFLAG) $(CFLAGS.SO) -o $@ -c $<
$(CC) -DGLEW_NO_GLU -DGLEW_MX $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
glewmx.pc: glew.pc.in
sed \

View File

@ -3,7 +3,6 @@ CC = cc
LD = cc
CFLAGS.EXTRA = -dynamic -fno-common
#CFLAGS.EXTRA += -no-cpp-precomp
PICFLAG = -fPIC
LDFLAGS.EXTRA =
ifneq (undefined, $(origin GLEW_APPLE_GLX))
CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
@ -15,6 +14,7 @@ LDFLAGS.STATIC =
LDFLAGS.DYNAMIC =
WARN = -Wall -W
POPT = -O2
CFLAGS.EXTRA += -fPIC
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).$(SO_MAJOR).dylib
LIB.DEVLNK = lib$(NAME).dylib

View File

@ -3,7 +3,6 @@ CC = cc
LD = cc
CFLAGS.EXTRA = -arch ppc -dynamic -fno-common
#CFLAGS.EXTRA += -no-cpp-precomp
PICFLAG = -fPIC
LDFLAGS.EXTRA = -arch ppc
ifneq (undefined, $(origin GLEW_APPLE_GLX))
CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
@ -15,6 +14,7 @@ LDFLAGS.STATIC =
LDFLAGS.DYNAMIC =
WARN = -Wall -W
POPT = -O2
CFLAGS.EXTRA += -fPIC
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).$(SO_MAJOR).dylib
LIB.DEVLNK = lib$(NAME).dylib

View File

@ -3,7 +3,6 @@ CC = cc
LD = cc
CFLAGS.EXTRA = -arch x86_64 -dynamic -fno-common
#CFLAGS.EXTRA += -no-cpp-precomp
PICFLAG = -fPIC
LDFLAGS.EXTRA = -arch x86_64
ifneq (undefined, $(origin GLEW_APPLE_GLX))
CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
@ -15,6 +14,7 @@ LDFLAGS.STATIC =
LDFLAGS.DYNAMIC =
WARN = -Wall -W
POPT = -O2
CFLAGS.EXTRA += -fPIC
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).$(SO_MAJOR).dylib
LIB.DEVLNK = lib$(NAME).dylib

View File

@ -1,7 +1,6 @@
NAME = $(GLEW_NAME)
CC = cc
LD = cc
PICFLAG = -fPIC
LDFLAGS.EXTRA = -L/usr/X11R6/lib
LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11
LDFLAGS.STATIC = -Wl,-Bstatic
@ -9,6 +8,7 @@ LDFLAGS.DYNAMIC = -Wl,-Bdynamic
NAME = GLEW
WARN = -Wall -W
POPT = -O2
CFLAGS.EXTRA += -fPIC
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
LIB.DEVLNK = lib$(NAME).so

View File

@ -1,7 +1,6 @@
NAME = $(GLEW_NAME)
CC = cc
LD = cc
PICFLAG = -fPIC
LDFLAGS.EXTRA = -L/usr/X11R6/lib
LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11
LDFLAGS.STATIC = -Wl,-Bstatic
@ -9,6 +8,7 @@ LDFLAGS.DYNAMIC = -Wl,-Bdynamic
NAME = GLEW
WARN = -Wall -W
POPT = -O2
CFLAGS.EXTRA += -fPIC
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
LIB.DEVLNK = lib$(NAME).so

View File

@ -1,7 +1,6 @@
NAME = $(GLEW_NAME)
CC = cc
LD = cc
PICFLAG = -fPIC
M_ARCH ?= $(shell uname -m)
ifeq (x86_64,${M_ARCH})
LDFLAGS.EXTRA = -L/usr/X11R6/lib64 -L/usr/lib64
@ -16,6 +15,7 @@ LDFLAGS.DYNAMIC = -Wl,-Bdynamic
NAME = GLEW
WARN = -Wall -W
POPT = -O2
CFLAGS.EXTRA += -fPIC
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
LIB.DEVLNK = lib$(NAME).so