GLEW Patch #63 - Use CC/CXX/LD variable from environment, don't hardcode cc

This commit is contained in:
Nigel Stewart 2014-02-19 18:19:47 -06:00
parent c5a3681eae
commit b19d0a09ed
18 changed files with 38 additions and 38 deletions

View File

@ -4,8 +4,8 @@ BINDIR = /usr/bin
LIBDIR = /usr/lib/mingw LIBDIR = /usr/lib/mingw
INCDIR = /usr/include/mingw/GL INCDIR = /usr/include/mingw/GL
# use gcc for linking, with ld it does not work # use gcc for linking, with ld it does not work
CC := gcc -mno-cygwin CC ?= gcc -mno-cygwin
LD := gcc -mno-cygwin LD ?= $(CC)
LN := LN :=
CFLAGS.SO = -DGLEW_BUILD CFLAGS.SO = -DGLEW_BUILD
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32

View File

@ -1,8 +1,8 @@
NAME = GLEW NAME = GLEW
GLEW_DEST ?= /usr GLEW_DEST ?= /usr
# use gcc for linking, with ld it does not work # use gcc for linking, with ld it does not work
CC := cc CC ?= cc
LD := cc LD ?= $(CC)
LN := LN :=
LDFLAGS.EXTRA = LDFLAGS.EXTRA =
LIBDIR = $(GLEW_DEST)/lib LIBDIR = $(GLEW_DEST)/lib

View File

@ -1,6 +1,6 @@
NAME = $(GLEW_NAME) NAME = $(GLEW_NAME)
CC = cc 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
LDFLAGS.EXTRA = LDFLAGS.EXTRA =

View File

@ -1,6 +1,6 @@
NAME = $(GLEW_NAME) NAME = $(GLEW_NAME)
CC = cc 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
LDFLAGS.EXTRA = -arch ppc LDFLAGS.EXTRA = -arch ppc

View File

@ -1,6 +1,6 @@
NAME = $(GLEW_NAME) NAME = $(GLEW_NAME)
CC = cc 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
LDFLAGS.EXTRA = -arch x86_64 LDFLAGS.EXTRA = -arch x86_64

View File

@ -1,6 +1,6 @@
NAME = $(GLEW_NAME) NAME = $(GLEW_NAME)
CC = cc CC ?= cc
LD = ld LD ?= ld
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

View File

@ -1,6 +1,6 @@
NAME = $(GLEW_NAME) NAME = $(GLEW_NAME)
CC = cc CC ?= cc
LD = cc LD ?= $(CC)
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

View File

@ -1,6 +1,6 @@
NAME = $(GLEW_NAME) NAME = $(GLEW_NAME)
CC = cc CC ?= cc
LD = cc LD ?= $(CC)
ifneq (undefined, $(origin GLEW_MX)) ifneq (undefined, $(origin GLEW_MX))
CFLAGS.EXTRA = -DGLEW_MX CFLAGS.EXTRA = -DGLEW_MX
endif endif

View File

@ -1,6 +1,6 @@
NAME = $(GLEW_NAME) NAME = $(GLEW_NAME)
CC = cc CC ?= cc
LD = ld LD ?= ld
ABI = -64# -n32 ABI = -64# -n32
CC += $(ABI) CC += $(ABI)
LD += $(ABI) LD += $(ABI)

View File

@ -1,6 +1,6 @@
NAME = $(GLEW_NAME) NAME = $(GLEW_NAME)
CC = cc CC ?= cc
LD = cc LD ?= $(CC)
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

View File

@ -1,6 +1,6 @@
NAME = $(GLEW_NAME) NAME = $(GLEW_NAME)
CC = cc CC ?= cc
LD = cc LD ?= $(CC)
M_ARCH ?= $(shell uname -m) M_ARCH ?= $(shell uname -m)
ARCH64 = false ARCH64 = false
ifeq (x86_64,${M_ARCH}) ifeq (x86_64,${M_ARCH})

View File

@ -1,7 +1,7 @@
NAME = glew32 NAME = glew32
# use gcc for linking, with ld it does not work # use gcc for linking, with ld it does not work
CC := gcc CC ?= gcc
LD := gcc LD ?= $(CC)
LN := LN :=
CFLAGS.SO = -DGLEW_BUILD CFLAGS.SO = -DGLEW_BUILD
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32

View File

@ -6,9 +6,9 @@ ifeq (Linux,${M_NAME})
M_PREFIX = i686 M_PREFIX = i686
endif endif
CC = $(M_PREFIX)-nacl-gcc CC ?= $(M_PREFIX)-nacl-gcc
CXX = $(M_PREFIX)-nacl-g++ CXX ?= $(M_PREFIX)-nacl-g++
LD = $(M_PREFIX)-nacl-ld LD ?= $(M_PREFIX)-nacl-ld
STRIP ?= STRIP ?=
EXT.DYNAMIC = so EXT.DYNAMIC = so
LDFLAGS.EXTRA = LDFLAGS.EXTRA =

View File

@ -6,9 +6,9 @@ ifeq (Linux,${M_NAME})
M_PREFIX = i686 M_PREFIX = i686
endif endif
CC = $(M_PREFIX)-nacl-gcc CC ?= $(M_PREFIX)-nacl-gcc
CXX = $(M_PREFIX)-nacl-g++ CXX ?= $(M_PREFIX)-nacl-g++
LD = $(M_PREFIX)-nacl-ld LD ?= $(M_PREFIX)-nacl-ld
STRIP ?= STRIP ?=
EXT.DYNAMIC = so EXT.DYNAMIC = so
LDFLAGS.EXTRA = LDFLAGS.EXTRA =

View File

@ -1,6 +1,6 @@
NAME = $(GLEW_NAME) NAME = $(GLEW_NAME)
CC = cc CC ?= cc
LD = ld LD ?= ld
LDFLAGS.EXTRA = -L/usr/X11R7/lib -R /usr/X11R7/lib LDFLAGS.EXTRA = -L/usr/X11R7/lib -R /usr/X11R7/lib
LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11 LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11
LDFLAGS.STATIC = -Wl,-Bstatic LDFLAGS.STATIC = -Wl,-Bstatic

View File

@ -1,6 +1,6 @@
NAME = $(GLEW_NAME) NAME = $(GLEW_NAME)
CC = cc CC ?= cc
LD = ld LD ?= ld
LDFLAGS.EXTRA = -L/usr/X11R6/lib LDFLAGS.EXTRA = -L/usr/X11R6/lib
LDFLAGS.GL = -lXmu -lXi -lGLU -lGL -lXext -lX11 -lm LDFLAGS.GL = -lXmu -lXi -lGLU -lGL -lXext -lX11 -lm
LDFLAGS.STATIC = -Wl,-Bstatic LDFLAGS.STATIC = -Wl,-Bstatic

View File

@ -1,6 +1,6 @@
NAME = $(GLEW_NAME) NAME = $(GLEW_NAME)
CC = cc CC ?= cc
LD = ld LD ?= ld
CFLAGS.EXTRA = -I/usr/openwin/include CFLAGS.EXTRA = -I/usr/openwin/include
LDFLAGS.SO = -G LDFLAGS.SO = -G
LDFLAGS.EXTRA = -L/usr/openwin/lib LDFLAGS.EXTRA = -L/usr/openwin/lib

View File

@ -1,6 +1,6 @@
NAME = $(GLEW_NAME) NAME = $(GLEW_NAME)
CC = gcc CC ?= gcc
LD = ld LD ?= ld
CFLAGS.EXTRA = -I/usr/openwin/include CFLAGS.EXTRA = -I/usr/openwin/include
LDFLAGS.SO = -G LDFLAGS.SO = -G
LDFLAGS.EXTRA = -L/usr/openwin/lib LDFLAGS.EXTRA = -L/usr/openwin/lib