Changed approach to be slightly more resilient to regression issues

This commit is contained in:
BastiaanOlij 2015-03-23 21:16:49 +11:00
parent 0c9ab41431
commit 69cbc3532f
23 changed files with 17 additions and 24 deletions

View File

@ -65,6 +65,7 @@ DIST_DIR := $(shell mktemp -d /tmp/glew.XXXXXX)/$(DIST_NAME)
# - use LN= on gmake command-line
AR ?= ar
ARFLAGS.STATIC ?= cr
INSTALL ?= install
STRIP ?= strip
RM ?= rm -f
@ -104,7 +105,7 @@ lib:
mkdir lib
lib/$(LIB.STATIC): $(LIB.OBJS)
$(AR) $(LDFLAGS.STATIC) $@ $^
$(AR) $(ARFLAGS.STATIC) $@ $^
ifneq ($(STRIP),)
$(STRIP) -x $@
endif
@ -148,7 +149,7 @@ glew.pc: glew.pc.in
glew.lib.mx: lib lib/$(LIB.SHARED.MX) lib/$(LIB.STATIC.MX) glewmx.pc
lib/$(LIB.STATIC.MX): $(LIB.OBJS.MX)
$(AR) $(LDFLAGS.STATIC) $@ $^
$(AR) $(ARFLAGS.STATIC) $@ $^
lib/$(LIB.SHARED.MX): $(LIB.SOBJS.MX)
$(LD) $(LDFLAGS.SO.MX) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)

View File

@ -7,7 +7,6 @@ INCDIR = /usr/include/mingw/GL
CC := gcc -mno-cygwin
LD := gcc -mno-cygwin
LN :=
LDFLAGS.STATIC = cr
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
LDFLAGS.EXTRA = -L$(LIBDIR)
WARN = -Wall -W

View File

@ -7,7 +7,7 @@ LN :=
LDFLAGS.EXTRA =
LIBDIR = $(GLEW_DEST)/lib
LDFLAGS.GL = -lGL -lX11
LDFLAGS.STATIC = cr -Wl,-Bstatic
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
WARN = -Wall -W
POPT = -O2

View File

@ -10,7 +10,7 @@ LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11
else
LDFLAGS.GL = -framework AGL -framework OpenGL
endif
LDFLAGS.STATIC = cr
LDFLAGS.STATIC =
LDFLAGS.DYNAMIC =
WARN = -Wall -W
POPT = -O2

View File

@ -10,7 +10,7 @@ LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11
else
LDFLAGS.GL = -framework AGL -framework OpenGL
endif
LDFLAGS.STATIC = cr
LDFLAGS.STATIC =
LDFLAGS.DYNAMIC =
WARN = -Wall -W
POPT = -O2

View File

@ -13,7 +13,7 @@ LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11
else
LDFLAGS.GL = -framework AGL -framework OpenGL
endif
LDFLAGS.STATIC = -static -o
ARFLAGS.STATIC = -static -o
LDFLAGS.DYNAMIC =
WARN = -Wall -W
POPT = -O2

View File

@ -10,7 +10,7 @@ LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11
else
LDFLAGS.GL = -framework AGL -framework OpenGL
endif
LDFLAGS.STATIC = cr
LDFLAGS.STATIC =
LDFLAGS.DYNAMIC =
WARN = -Wall -W
POPT = -O2

View File

@ -3,7 +3,7 @@ CC = cc
LD = ld
LDFLAGS.EXTRA = -L/usr/X11R6/lib
LDFLAGS.GL = -lGL -lX11
LDFLAGS.STATIC = cr -Wl,-Bstatic
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
CFLAGS.EXTRA += -I/usr/X11R6/include -fPIC
NAME = GLEW

View File

@ -3,7 +3,7 @@ CC = cc
LD = cc
LDFLAGS.EXTRA = -L/usr/X11R6/lib
LDFLAGS.GL = -lGL -lX11
LDFLAGS.STATIC = cr -Wl,-Bstatic
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
NAME = GLEW
WARN = -Wall -W

View File

@ -6,7 +6,7 @@ ifneq (undefined, $(origin GLEW_MX))
endif
LDFLAGS.GL = -lGL
LDFLAGS.STATIC = cr -Wl,-Bstatic
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
NAME = GLEW

View File

@ -4,7 +4,6 @@ LD = ld
ABI = -64# -n32
CC += $(ABI)
LD += $(ABI)
LDFLAGS.STATIC = cr
LDFLAGS.EXTRA =
LDFLAGS.GL = -lGL -lXext -lX11
NAME = GLEW

View File

@ -3,7 +3,7 @@ CC = cc
LD = cc
LDFLAGS.EXTRA = -L/usr/X11R6/lib
LDFLAGS.GL = -lGL -lX11
LDFLAGS.STATIC = cr -Wl,-Bstatic
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
NAME = GLEW
WARN = -Wall -W

View File

@ -17,7 +17,7 @@ else
LIBDIR = $(GLEW_DEST)/lib
endif
LDFLAGS.GL = -lGL -lX11
LDFLAGS.STATIC = cr -Wl,-Bstatic
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
NAME = GLEW
WARN = -Wall -W

View File

@ -9,7 +9,6 @@ CC := i686-w64-mingw32-gcc
LD := i686-w64-mingw32-ld
LN :=
STRIP :=
LDFLAGS.STATIC = cr
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
WARN = -Wall -W
POPT = -O2

View File

@ -10,7 +10,6 @@ CC := $(HOST)-gcc
LD := $(HOST)-ld
LN :=
STRIP :=
LDFLAGS.STATIC = cr
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
WARN = -Wall -W
POPT = -O2

View File

@ -10,7 +10,6 @@ CC := $(HOST)-gcc
LD := $(HOST)-ld
LN :=
STRIP :=
LDFLAGS.STATIC = cr
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
WARN = -Wall -W
POPT = -O2

View File

@ -3,7 +3,6 @@ NAME = glew32
CC := gcc
LD := gcc
LN :=
LDFLAGS.STATIC = cr
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
LDFLAGS.EXTRA = -L/mingw/lib
WARN = -Wall -W

View File

@ -19,7 +19,7 @@ LDFLAGS.EXTRA += -melf_nacl
LDFLAGS.GL =
LDFLAGS.GLU = -lRegalGLU
LDFLAGS.GLUT = -lRegalGLUT
LDFLAGS.STATIC = cr
LDFLAGS.STATIC =
LDFLAGS.DYNAMIC = -shared
WARN = -Wall -W -Wno-unused-parameter
POPT = -O2

View File

@ -19,7 +19,7 @@ LDFLAGS.EXTRA += -melf64_nacl
LDFLAGS.GL =
LDFLAGS.GLU = -lRegalGLU
LDFLAGS.GLUT = -lRegalGLUT
LDFLAGS.STATIC = cr
LDFLAGS.STATIC =
LDFLAGS.DYNAMIC = -shared
WARN = -Wall -W -Wno-unused-parameter
POPT = -O2

View File

@ -3,7 +3,7 @@ CC = cc
LD = ld
LDFLAGS.EXTRA = -L/usr/X11R7/lib -R /usr/X11R7/lib
LDFLAGS.GL = -lGL -lX11
LDFLAGS.STATIC = cr -Wl,-Bstatic
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
CFLAGS.EXTRA += -I/usr/X11R7/include -fPIC
NAME = GLEW

View File

@ -3,7 +3,7 @@ CC = cc
LD = ld
LDFLAGS.EXTRA = -L/usr/X11R6/lib
LDFLAGS.GL = -lGLU -lGL -lX11 -lm
LDFLAGS.STATIC = cr -Wl,-Bstatic
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
CFLAGS.EXTRA += -I/usr/X11R6/include
NAME = GLEW

View File

@ -2,7 +2,6 @@ NAME = $(GLEW_NAME)
CC = cc
LD = ld
CFLAGS.EXTRA = -I/usr/openwin/include -Kpic
LDFLAGS.STATIC = cr
LDFLAGS.SO = -G
LDFLAGS.EXTRA = -L/usr/openwin/lib
LDFLAGS.GL = -lGL -lX11

View File

@ -2,7 +2,6 @@ NAME = $(GLEW_NAME)
CC = gcc
LD = ld
CFLAGS.EXTRA = -I/usr/openwin/include -fPIC
LDFLAGS.STATIC = cr
LDFLAGS.SO = -G
LDFLAGS.EXTRA = -L/usr/openwin/lib
LDFLAGS.GL = -lGL -lX11