mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-26 08:31:56 +00:00
Use -fPIC for Linux and Darwin builds.
See: https://bugs.launchpad.net/ubuntu/+source/glew/+bug/811789
This commit is contained in:
parent
60e85a9815
commit
0a04f18c01
4
Makefile
4
Makefile
@ -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
|
tmp/$(SYSTEM)/default/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
|
||||||
@mkdir -p $(dir $@)
|
@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
|
glew.pc: glew.pc.in
|
||||||
sed \
|
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
|
tmp/$(SYSTEM)/mx/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
|
||||||
@mkdir -p $(dir $@)
|
@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
|
glewmx.pc: glew.pc.in
|
||||||
sed \
|
sed \
|
||||||
|
@ -3,7 +3,6 @@ CC = cc
|
|||||||
LD = cc
|
LD = cc
|
||||||
CFLAGS.EXTRA = -dynamic -fno-common
|
CFLAGS.EXTRA = -dynamic -fno-common
|
||||||
#CFLAGS.EXTRA += -no-cpp-precomp
|
#CFLAGS.EXTRA += -no-cpp-precomp
|
||||||
PICFLAG = -fPIC
|
|
||||||
LDFLAGS.EXTRA =
|
LDFLAGS.EXTRA =
|
||||||
ifneq (undefined, $(origin GLEW_APPLE_GLX))
|
ifneq (undefined, $(origin GLEW_APPLE_GLX))
|
||||||
CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
|
CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
|
||||||
@ -15,6 +14,7 @@ LDFLAGS.STATIC =
|
|||||||
LDFLAGS.DYNAMIC =
|
LDFLAGS.DYNAMIC =
|
||||||
WARN = -Wall -W
|
WARN = -Wall -W
|
||||||
POPT = -O2
|
POPT = -O2
|
||||||
|
CFLAGS.EXTRA += -fPIC
|
||||||
BIN.SUFFIX =
|
BIN.SUFFIX =
|
||||||
LIB.SONAME = lib$(NAME).$(SO_MAJOR).dylib
|
LIB.SONAME = lib$(NAME).$(SO_MAJOR).dylib
|
||||||
LIB.DEVLNK = lib$(NAME).dylib
|
LIB.DEVLNK = lib$(NAME).dylib
|
||||||
|
@ -3,7 +3,6 @@ CC = cc
|
|||||||
LD = cc
|
LD = cc
|
||||||
CFLAGS.EXTRA = -arch ppc -dynamic -fno-common
|
CFLAGS.EXTRA = -arch ppc -dynamic -fno-common
|
||||||
#CFLAGS.EXTRA += -no-cpp-precomp
|
#CFLAGS.EXTRA += -no-cpp-precomp
|
||||||
PICFLAG = -fPIC
|
|
||||||
LDFLAGS.EXTRA = -arch ppc
|
LDFLAGS.EXTRA = -arch ppc
|
||||||
ifneq (undefined, $(origin GLEW_APPLE_GLX))
|
ifneq (undefined, $(origin GLEW_APPLE_GLX))
|
||||||
CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
|
CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
|
||||||
@ -15,6 +14,7 @@ LDFLAGS.STATIC =
|
|||||||
LDFLAGS.DYNAMIC =
|
LDFLAGS.DYNAMIC =
|
||||||
WARN = -Wall -W
|
WARN = -Wall -W
|
||||||
POPT = -O2
|
POPT = -O2
|
||||||
|
CFLAGS.EXTRA += -fPIC
|
||||||
BIN.SUFFIX =
|
BIN.SUFFIX =
|
||||||
LIB.SONAME = lib$(NAME).$(SO_MAJOR).dylib
|
LIB.SONAME = lib$(NAME).$(SO_MAJOR).dylib
|
||||||
LIB.DEVLNK = lib$(NAME).dylib
|
LIB.DEVLNK = lib$(NAME).dylib
|
||||||
|
@ -3,7 +3,6 @@ CC = cc
|
|||||||
LD = cc
|
LD = cc
|
||||||
CFLAGS.EXTRA = -arch x86_64 -dynamic -fno-common
|
CFLAGS.EXTRA = -arch x86_64 -dynamic -fno-common
|
||||||
#CFLAGS.EXTRA += -no-cpp-precomp
|
#CFLAGS.EXTRA += -no-cpp-precomp
|
||||||
PICFLAG = -fPIC
|
|
||||||
LDFLAGS.EXTRA = -arch x86_64
|
LDFLAGS.EXTRA = -arch x86_64
|
||||||
ifneq (undefined, $(origin GLEW_APPLE_GLX))
|
ifneq (undefined, $(origin GLEW_APPLE_GLX))
|
||||||
CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
|
CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
|
||||||
@ -15,6 +14,7 @@ LDFLAGS.STATIC =
|
|||||||
LDFLAGS.DYNAMIC =
|
LDFLAGS.DYNAMIC =
|
||||||
WARN = -Wall -W
|
WARN = -Wall -W
|
||||||
POPT = -O2
|
POPT = -O2
|
||||||
|
CFLAGS.EXTRA += -fPIC
|
||||||
BIN.SUFFIX =
|
BIN.SUFFIX =
|
||||||
LIB.SONAME = lib$(NAME).$(SO_MAJOR).dylib
|
LIB.SONAME = lib$(NAME).$(SO_MAJOR).dylib
|
||||||
LIB.DEVLNK = lib$(NAME).dylib
|
LIB.DEVLNK = lib$(NAME).dylib
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
NAME = $(GLEW_NAME)
|
NAME = $(GLEW_NAME)
|
||||||
CC = cc
|
CC = cc
|
||||||
LD = cc
|
LD = cc
|
||||||
PICFLAG = -fPIC
|
|
||||||
LDFLAGS.EXTRA = -L/usr/X11R6/lib
|
LDFLAGS.EXTRA = -L/usr/X11R6/lib
|
||||||
LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11
|
LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11
|
||||||
LDFLAGS.STATIC = -Wl,-Bstatic
|
LDFLAGS.STATIC = -Wl,-Bstatic
|
||||||
@ -9,6 +8,7 @@ LDFLAGS.DYNAMIC = -Wl,-Bdynamic
|
|||||||
NAME = GLEW
|
NAME = GLEW
|
||||||
WARN = -Wall -W
|
WARN = -Wall -W
|
||||||
POPT = -O2
|
POPT = -O2
|
||||||
|
CFLAGS.EXTRA += -fPIC
|
||||||
BIN.SUFFIX =
|
BIN.SUFFIX =
|
||||||
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
|
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
|
||||||
LIB.DEVLNK = lib$(NAME).so
|
LIB.DEVLNK = lib$(NAME).so
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
NAME = $(GLEW_NAME)
|
NAME = $(GLEW_NAME)
|
||||||
CC = cc
|
CC = cc
|
||||||
LD = cc
|
LD = cc
|
||||||
PICFLAG = -fPIC
|
|
||||||
LDFLAGS.EXTRA = -L/usr/X11R6/lib
|
LDFLAGS.EXTRA = -L/usr/X11R6/lib
|
||||||
LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11
|
LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11
|
||||||
LDFLAGS.STATIC = -Wl,-Bstatic
|
LDFLAGS.STATIC = -Wl,-Bstatic
|
||||||
@ -9,6 +8,7 @@ LDFLAGS.DYNAMIC = -Wl,-Bdynamic
|
|||||||
NAME = GLEW
|
NAME = GLEW
|
||||||
WARN = -Wall -W
|
WARN = -Wall -W
|
||||||
POPT = -O2
|
POPT = -O2
|
||||||
|
CFLAGS.EXTRA += -fPIC
|
||||||
BIN.SUFFIX =
|
BIN.SUFFIX =
|
||||||
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
|
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
|
||||||
LIB.DEVLNK = lib$(NAME).so
|
LIB.DEVLNK = lib$(NAME).so
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
NAME = $(GLEW_NAME)
|
NAME = $(GLEW_NAME)
|
||||||
CC = cc
|
CC = cc
|
||||||
LD = cc
|
LD = cc
|
||||||
PICFLAG = -fPIC
|
|
||||||
M_ARCH ?= $(shell uname -m)
|
M_ARCH ?= $(shell uname -m)
|
||||||
ifeq (x86_64,${M_ARCH})
|
ifeq (x86_64,${M_ARCH})
|
||||||
LDFLAGS.EXTRA = -L/usr/X11R6/lib64 -L/usr/lib64
|
LDFLAGS.EXTRA = -L/usr/X11R6/lib64 -L/usr/lib64
|
||||||
@ -16,6 +15,7 @@ LDFLAGS.DYNAMIC = -Wl,-Bdynamic
|
|||||||
NAME = GLEW
|
NAME = GLEW
|
||||||
WARN = -Wall -W
|
WARN = -Wall -W
|
||||||
POPT = -O2
|
POPT = -O2
|
||||||
|
CFLAGS.EXTRA += -fPIC
|
||||||
BIN.SUFFIX =
|
BIN.SUFFIX =
|
||||||
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
|
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
|
||||||
LIB.DEVLNK = lib$(NAME).so
|
LIB.DEVLNK = lib$(NAME).so
|
||||||
|
Loading…
Reference in New Issue
Block a user