diff --git a/config/Makefile.cygming b/config/Makefile.cygming index afdd851..7c0dda4 100644 --- a/config/Makefile.cygming +++ b/config/Makefile.cygming @@ -4,8 +4,8 @@ BINDIR = /usr/bin LIBDIR = /usr/lib/mingw INCDIR = /usr/include/mingw/GL # use gcc for linking, with ld it does not work -CC := gcc -mno-cygwin -LD := gcc -mno-cygwin +CC ?= gcc -mno-cygwin +LD ?= $(CC) LN := CFLAGS.SO = -DGLEW_BUILD LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 diff --git a/config/Makefile.cygwin b/config/Makefile.cygwin index b044273..c715f62 100644 --- a/config/Makefile.cygwin +++ b/config/Makefile.cygwin @@ -1,8 +1,8 @@ NAME = GLEW GLEW_DEST ?= /usr # use gcc for linking, with ld it does not work -CC := cc -LD := cc +CC ?= cc +LD ?= $(CC) LN := LDFLAGS.EXTRA = LIBDIR = $(GLEW_DEST)/lib diff --git a/config/Makefile.darwin b/config/Makefile.darwin index 0c05ed1..87941ff 100644 --- a/config/Makefile.darwin +++ b/config/Makefile.darwin @@ -1,6 +1,6 @@ NAME = $(GLEW_NAME) -CC = cc -LD = cc +CC ?= cc +LD ?= $(CC) CFLAGS.EXTRA = -dynamic -fno-common #CFLAGS.EXTRA += -no-cpp-precomp LDFLAGS.EXTRA = diff --git a/config/Makefile.darwin-ppc b/config/Makefile.darwin-ppc index 2aaf66a..c5a57db 100644 --- a/config/Makefile.darwin-ppc +++ b/config/Makefile.darwin-ppc @@ -1,6 +1,6 @@ NAME = $(GLEW_NAME) -CC = cc -LD = cc +CC ?= cc +LD ?= $(CC) CFLAGS.EXTRA = -arch ppc -dynamic -fno-common #CFLAGS.EXTRA += -no-cpp-precomp LDFLAGS.EXTRA = -arch ppc diff --git a/config/Makefile.darwin-x86_64 b/config/Makefile.darwin-x86_64 index 83e5c47..4944f7a 100644 --- a/config/Makefile.darwin-x86_64 +++ b/config/Makefile.darwin-x86_64 @@ -1,6 +1,6 @@ NAME = $(GLEW_NAME) -CC = cc -LD = cc +CC ?= cc +LD ?= $(CC) CFLAGS.EXTRA = -arch x86_64 -dynamic -fno-common #CFLAGS.EXTRA += -no-cpp-precomp LDFLAGS.EXTRA = -arch x86_64 diff --git a/config/Makefile.freebsd b/config/Makefile.freebsd index ab9d9d9..3973bdd 100644 --- a/config/Makefile.freebsd +++ b/config/Makefile.freebsd @@ -1,6 +1,6 @@ NAME = $(GLEW_NAME) -CC = cc -LD = ld +CC ?= cc +LD ?= ld LDFLAGS.EXTRA = -L/usr/X11R6/lib LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11 LDFLAGS.STATIC = -Wl,-Bstatic diff --git a/config/Makefile.gnu b/config/Makefile.gnu index 2398ab0..332952e 100644 --- a/config/Makefile.gnu +++ b/config/Makefile.gnu @@ -1,6 +1,6 @@ NAME = $(GLEW_NAME) -CC = cc -LD = cc +CC ?= cc +LD ?= $(CC) LDFLAGS.EXTRA = -L/usr/X11R6/lib LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11 LDFLAGS.STATIC = -Wl,-Bstatic diff --git a/config/Makefile.haiku b/config/Makefile.haiku index ce832f9..f5f8fd3 100644 --- a/config/Makefile.haiku +++ b/config/Makefile.haiku @@ -1,6 +1,6 @@ NAME = $(GLEW_NAME) -CC = cc -LD = cc +CC ?= cc +LD ?= $(CC) ifneq (undefined, $(origin GLEW_MX)) CFLAGS.EXTRA = -DGLEW_MX endif diff --git a/config/Makefile.irix b/config/Makefile.irix index a1be5ee..aa1a3b2 100644 --- a/config/Makefile.irix +++ b/config/Makefile.irix @@ -1,6 +1,6 @@ NAME = $(GLEW_NAME) -CC = cc -LD = ld +CC ?= cc +LD ?= ld ABI = -64# -n32 CC += $(ABI) LD += $(ABI) diff --git a/config/Makefile.kfreebsd b/config/Makefile.kfreebsd index 9501091..a13a6ea 100644 --- a/config/Makefile.kfreebsd +++ b/config/Makefile.kfreebsd @@ -1,6 +1,6 @@ NAME = $(GLEW_NAME) -CC = cc -LD = cc +CC ?= cc +LD ?= $(CC) LDFLAGS.EXTRA = -L/usr/X11R6/lib LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11 LDFLAGS.STATIC = -Wl,-Bstatic diff --git a/config/Makefile.linux b/config/Makefile.linux index 234adc6..96ab7c6 100644 --- a/config/Makefile.linux +++ b/config/Makefile.linux @@ -1,6 +1,6 @@ NAME = $(GLEW_NAME) -CC = cc -LD = cc +CC ?= cc +LD ?= $(CC) M_ARCH ?= $(shell uname -m) ARCH64 = false ifeq (x86_64,${M_ARCH}) diff --git a/config/Makefile.mingw b/config/Makefile.mingw index e74fd3c..398c53a 100644 --- a/config/Makefile.mingw +++ b/config/Makefile.mingw @@ -1,7 +1,7 @@ NAME = glew32 # use gcc for linking, with ld it does not work -CC := gcc -LD := gcc +CC ?= gcc +LD ?= $(CC) LN := CFLAGS.SO = -DGLEW_BUILD LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 diff --git a/config/Makefile.nacl-32 b/config/Makefile.nacl-32 index 2a5cec7..8f43958 100644 --- a/config/Makefile.nacl-32 +++ b/config/Makefile.nacl-32 @@ -6,9 +6,9 @@ ifeq (Linux,${M_NAME}) M_PREFIX = i686 endif -CC = $(M_PREFIX)-nacl-gcc -CXX = $(M_PREFIX)-nacl-g++ -LD = $(M_PREFIX)-nacl-ld +CC ?= $(M_PREFIX)-nacl-gcc +CXX ?= $(M_PREFIX)-nacl-g++ +LD ?= $(M_PREFIX)-nacl-ld STRIP ?= EXT.DYNAMIC = so LDFLAGS.EXTRA = diff --git a/config/Makefile.nacl-64 b/config/Makefile.nacl-64 index 37cb6e9..1d3f44f 100644 --- a/config/Makefile.nacl-64 +++ b/config/Makefile.nacl-64 @@ -6,9 +6,9 @@ ifeq (Linux,${M_NAME}) M_PREFIX = i686 endif -CC = $(M_PREFIX)-nacl-gcc -CXX = $(M_PREFIX)-nacl-g++ -LD = $(M_PREFIX)-nacl-ld +CC ?= $(M_PREFIX)-nacl-gcc +CXX ?= $(M_PREFIX)-nacl-g++ +LD ?= $(M_PREFIX)-nacl-ld STRIP ?= EXT.DYNAMIC = so LDFLAGS.EXTRA = diff --git a/config/Makefile.netbsd b/config/Makefile.netbsd index 5f69cd6..a781c2a 100644 --- a/config/Makefile.netbsd +++ b/config/Makefile.netbsd @@ -1,6 +1,6 @@ NAME = $(GLEW_NAME) -CC = cc -LD = ld +CC ?= cc +LD ?= ld LDFLAGS.EXTRA = -L/usr/X11R7/lib -R /usr/X11R7/lib LDFLAGS.GL = -lXmu -lXi -lGL -lXext -lX11 LDFLAGS.STATIC = -Wl,-Bstatic diff --git a/config/Makefile.openbsd b/config/Makefile.openbsd index 365ea9e..bd61960 100644 --- a/config/Makefile.openbsd +++ b/config/Makefile.openbsd @@ -1,6 +1,6 @@ NAME = $(GLEW_NAME) -CC = cc -LD = ld +CC ?= cc +LD ?= ld LDFLAGS.EXTRA = -L/usr/X11R6/lib LDFLAGS.GL = -lXmu -lXi -lGLU -lGL -lXext -lX11 -lm LDFLAGS.STATIC = -Wl,-Bstatic diff --git a/config/Makefile.solaris b/config/Makefile.solaris index befba5a..b435798 100644 --- a/config/Makefile.solaris +++ b/config/Makefile.solaris @@ -1,6 +1,6 @@ NAME = $(GLEW_NAME) -CC = cc -LD = ld +CC ?= cc +LD ?= ld CFLAGS.EXTRA = -I/usr/openwin/include LDFLAGS.SO = -G LDFLAGS.EXTRA = -L/usr/openwin/lib diff --git a/config/Makefile.solaris-gcc b/config/Makefile.solaris-gcc index c0373f4..53c704d 100644 --- a/config/Makefile.solaris-gcc +++ b/config/Makefile.solaris-gcc @@ -1,6 +1,6 @@ NAME = $(GLEW_NAME) -CC = gcc -LD = ld +CC ?= gcc +LD ?= ld CFLAGS.EXTRA = -I/usr/openwin/include LDFLAGS.SO = -G LDFLAGS.EXTRA = -L/usr/openwin/lib