libglew/libglew-1.5.1-makefile.patch

72 lines
2.1 KiB
Diff

diff -ru glew.orig/config/Makefile.linux glew/config/Makefile.linux
--- glew.orig/config/Makefile.linux 2009-06-03 22:53:27.000000000 +0200
+++ glew/config/Makefile.linux 2009-06-03 22:54:00.000000000 +0200
@@ -7,14 +7,8 @@
PICFLAG = -fPIC
LDFLAGS.SO = -shared -Wl,-soname=$(LIB.SONAME)
M_ARCH ?= $(shell arch)
-ifeq (x86_64,${M_ARCH})
-LDFLAGS.EXTRA = -L/usr/X11R6/lib64
-LIBDIR = $(GLEW_DEST)/lib64
-else
-LDFLAGS.EXTRA = -L/usr/X11R6/lib
-LIBDIR = $(GLEW_DEST)/lib
-endif
-LDFLAGS.GL = -lXmu -lXi -lGLU -lGL -lXext -lX11
+LIBDIR = $(GLEW_DEST)$(libdir)
+LDFLAGS.GL = -lGL
LDFLAGS.STATIC = -Wl,-Bstatic
LDFLAGS.DYNAMIC = -Wl,-Bdynamic
NAME = GLEW
diff -ru glew.orig/Makefile glew/Makefile
--- glew.orig/Makefile 2009-06-03 22:53:27.000000000 +0200
+++ glew/Makefile 2009-06-03 22:57:17.000000000 +0200
@@ -41,16 +41,16 @@
endif
GLEW_DEST ?= /usr
-BINDIR ?= $(GLEW_DEST)/bin
-LIBDIR ?= $(GLEW_DEST)/lib
-INCDIR ?= $(GLEW_DEST)/include/GL
+BINDIR ?= $(GLEW_DEST)$(bindir)
+LIBDIR ?= $(GLEW_DEST)$(libdir)
+INCDIR ?= $(GLEW_DEST)$(includedir)/GL
SHARED_OBJ_EXT ?= o
TARDIR = ../glew-$(GLEW_VERSION)
TARBALL = ../glew_$(GLEW_VERSION).tar.gz
AR = ar
INSTALL = install
-STRIP = strip
+STRIP = true
RM = rm -f
LN = ln -sf
ifeq ($(MAKECMDGOALS), debug)
@@ -95,7 +95,7 @@
$(CC) $(CFLAGS) -o $@ $(GLEWINFO.BIN.SRCS) $(BIN.LIBS)
bin/$(VISUALINFO.BIN): $(VISUALINFO.BIN.SRCS) lib/$(LIB.SHARED)
- $(CC) $(CFLAGS) -o $@ $(VISUALINFO.BIN.SRCS) $(BIN.LIBS)
+ $(CC) $(CFLAGS) -o $@ $(VISUALINFO.BIN.SRCS) $(BIN.LIBS) -lGLU
%.o: %.c
$(CC) -c $(CFLAGS) -o $@ $<
@@ -117,7 +117,7 @@
$(INSTALL) -m 0644 lib/$(LIB.SHARED) $(BINDIR)/
else
$(STRIP) -x lib/$(LIB.SHARED)
- $(INSTALL) -m 0644 lib/$(LIB.SHARED) $(LIBDIR)/
+ $(INSTALL) -m 0755 lib/$(LIB.SHARED) $(LIBDIR)/
$(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.SONAME)
endif
# development files
@@ -132,7 +132,7 @@
$(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.DEVLNK)
endif
# utilities
- $(INSTALL) -s -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) $(BINDIR)/
+ $(INSTALL) -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) $(BINDIR)/
uninstall:
$(RM) $(INCDIR)/wglew.h