Commit 0c9ab414 authored by BastiaanOlij's avatar BastiaanOlij
Browse files

Changing over makefiles so LDFLAGS.STATIC is used. Also added...

Changing over makefiles so LDFLAGS.STATIC is used. Also added makefile.darwin-universal for creating a universal static library that can be used properly.
parent 4fcd4688
......@@ -104,7 +104,7 @@ lib:
mkdir lib
lib/$(LIB.STATIC): $(LIB.OBJS)
$(AR) cr $@ $^
$(AR) $(LDFLAGS.STATIC) $@ $^
ifneq ($(STRIP),)
$(STRIP) -x $@
endif
......@@ -148,7 +148,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) cr $@ $^
$(AR) $(LDFLAGS.STATIC) $@ $^
lib/$(LIB.SHARED.MX): $(LIB.SOBJS.MX)
$(LD) $(LDFLAGS.SO.MX) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
......
......@@ -7,6 +7,7 @@ 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
......
......@@ -7,7 +7,7 @@ LN :=
LDFLAGS.EXTRA =
LIBDIR = $(GLEW_DEST)/lib
LDFLAGS.GL = -lGL -lX11
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.STATIC = cr -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
WARN = -Wall -W
POPT = -O2
......
......@@ -10,7 +10,7 @@ LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11
else
LDFLAGS.GL = -framework AGL -framework OpenGL
endif
LDFLAGS.STATIC =
LDFLAGS.STATIC = cr
LDFLAGS.DYNAMIC =
WARN = -Wall -W
POPT = -O2
......
......@@ -10,7 +10,7 @@ LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11
else
LDFLAGS.GL = -framework AGL -framework OpenGL
endif
LDFLAGS.STATIC =
LDFLAGS.STATIC = cr
LDFLAGS.DYNAMIC =
WARN = -Wall -W
POPT = -O2
......
NAME = $(GLEW_NAME)
CC = cc
LD = cc
AR = LIBTOOL
STRIP =
CFLAGS.EXTRA = -dynamic -fno-common
#CFLAGS.EXTRA += -no-cpp-precomp
CFLAGS.EXTRA += -arch i386 -arch x86_64
LDFLAGS.EXTRA = -arch i386 -arch x86_64
ifneq (undefined, $(origin GLEW_APPLE_GLX))
CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11
else
LDFLAGS.GL = -framework AGL -framework OpenGL
endif
LDFLAGS.STATIC = -static -o
LDFLAGS.DYNAMIC =
WARN = -Wall -W
POPT = -O2
CFLAGS.EXTRA += -fPIC
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).$(SO_MAJOR).dylib
LIB.DEVLNK = lib$(NAME).dylib
LIB.SHARED = lib$(NAME).$(SO_VERSION).dylib
LIB.STATIC = lib$(NAME).a
LDFLAGS.SO = -dynamiclib -install_name $(GLEW_DEST)/lib/$(LIB.SHARED) -current_version $(SO_VERSION) -compatibility_version $(SO_MAJOR)
LIB.SONAME.MX = lib$(NAME)mx.$(SO_MAJOR).dylib
LIB.DEVLNK.MX = lib$(NAME)mx.dylib
LIB.SHARED.MX = lib$(NAME)mx.$(SO_VERSION).dylib
LIB.STATIC.MX = lib$(NAME)mx.a
LDFLAGS.SO.MX = -dynamiclib -install_name $(GLEW_DEST)/lib/$(LIB.SHARED.MX) -current_version $(SO_VERSION) -compatibility_version $(SO_MAJOR)
......@@ -10,7 +10,7 @@ LDFLAGS.GL = -L/usr/X11R6/lib -lGL -lX11
else
LDFLAGS.GL = -framework AGL -framework OpenGL
endif
LDFLAGS.STATIC =
LDFLAGS.STATIC = cr
LDFLAGS.DYNAMIC =
WARN = -Wall -W
POPT = -O2
......
......@@ -3,7 +3,7 @@ CC = cc
LD = ld
LDFLAGS.EXTRA = -L/usr/X11R6/lib
LDFLAGS.GL = -lGL -lX11
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.STATIC = cr -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
CFLAGS.EXTRA += -I/usr/X11R6/include -fPIC
NAME = GLEW
......
......@@ -3,7 +3,7 @@ CC = cc
LD = cc
LDFLAGS.EXTRA = -L/usr/X11R6/lib
LDFLAGS.GL = -lGL -lX11
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.STATIC = cr -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
NAME = GLEW
WARN = -Wall -W
......
......@@ -6,7 +6,7 @@ ifneq (undefined, $(origin GLEW_MX))
endif
LDFLAGS.GL = -lGL
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.STATIC = cr -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
NAME = GLEW
......
......@@ -4,6 +4,7 @@ LD = ld
ABI = -64# -n32
CC += $(ABI)
LD += $(ABI)
LDFLAGS.STATIC = cr
LDFLAGS.EXTRA =
LDFLAGS.GL = -lGL -lXext -lX11
NAME = GLEW
......
......@@ -3,7 +3,7 @@ CC = cc
LD = cc
LDFLAGS.EXTRA = -L/usr/X11R6/lib
LDFLAGS.GL = -lGL -lX11
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.STATIC = cr -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
NAME = GLEW
WARN = -Wall -W
......
......@@ -17,7 +17,7 @@ else
LIBDIR = $(GLEW_DEST)/lib
endif
LDFLAGS.GL = -lGL -lX11
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.STATIC = cr -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
NAME = GLEW
WARN = -Wall -W
......
......@@ -9,6 +9,7 @@ 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
......
......@@ -10,6 +10,7 @@ CC := $(HOST)-gcc
LD := $(HOST)-ld
LN :=
STRIP :=
LDFLAGS.STATIC = cr
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
WARN = -Wall -W
POPT = -O2
......
......@@ -10,6 +10,7 @@ CC := $(HOST)-gcc
LD := $(HOST)-ld
LN :=
STRIP :=
LDFLAGS.STATIC = cr
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
WARN = -Wall -W
POPT = -O2
......
......@@ -3,6 +3,7 @@ NAME = glew32
CC := gcc
LD := gcc
LN :=
LDFLAGS.STATIC = cr
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
LDFLAGS.EXTRA = -L/mingw/lib
WARN = -Wall -W
......
......@@ -19,7 +19,7 @@ LDFLAGS.EXTRA += -melf_nacl
LDFLAGS.GL =
LDFLAGS.GLU = -lRegalGLU
LDFLAGS.GLUT = -lRegalGLUT
LDFLAGS.STATIC =
LDFLAGS.STATIC = cr
LDFLAGS.DYNAMIC = -shared
WARN = -Wall -W -Wno-unused-parameter
POPT = -O2
......
......@@ -19,7 +19,7 @@ LDFLAGS.EXTRA += -melf64_nacl
LDFLAGS.GL =
LDFLAGS.GLU = -lRegalGLU
LDFLAGS.GLUT = -lRegalGLUT
LDFLAGS.STATIC =
LDFLAGS.STATIC = cr
LDFLAGS.DYNAMIC = -shared
WARN = -Wall -W -Wno-unused-parameter
POPT = -O2
......
......@@ -3,7 +3,7 @@ CC = cc
LD = ld
LDFLAGS.EXTRA = -L/usr/X11R7/lib -R /usr/X11R7/lib
LDFLAGS.GL = -lGL -lX11
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.STATIC = cr -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
CFLAGS.EXTRA += -I/usr/X11R7/include -fPIC
NAME = GLEW
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment