37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
$OpenBSD: patch-Makefile,v 1.3 2010/04/15 15:02:49 sthen Exp $
|
|
--- Makefile.orig Mon Mar 1 00:09:38 2010
|
|
+++ Makefile Fri Apr 9 22:35:06 2010
|
|
@@ -64,7 +64,7 @@ else
|
|
OPT = $(POPT)
|
|
endif
|
|
INCLUDE = -Iinclude
|
|
-CFLAGS = $(OPT) $(WARN) $(INCLUDE) $(CFLAGS.EXTRA)
|
|
+CFLAGS += $(OPT) $(WARN) $(INCLUDE) $(CFLAGS.EXTRA)
|
|
|
|
LIB.SRCS = src/glew.c
|
|
LIB.OBJS = $(LIB.SRCS:.c=.o)
|
|
@@ -89,12 +89,7 @@ lib/$(LIB.STATIC): $(LIB.OBJS)
|
|
$(AR) cr $@ $^
|
|
|
|
lib/$(LIB.SHARED): $(LIB.SOBJS)
|
|
- $(LD) $(LDFLAGS.SO) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
|
|
-ifeq ($(patsubst mingw%,mingw,$(SYSTEM)), mingw)
|
|
-else
|
|
- $(LN) $(LIB.SHARED) lib/$(LIB.SONAME)
|
|
- $(LN) $(LIB.SHARED) lib/$(LIB.DEVLNK)
|
|
-endif
|
|
+ $(LD) $(LDFLAGS.SO) -fPIC -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
|
|
|
|
bin/$(GLEWINFO.BIN): $(GLEWINFO.BIN.OBJS) lib/$(LIB.SHARED)
|
|
$(CC) $(CFLAGS) -o $@ $(GLEWINFO.BIN.OBJS) $(BIN.LIBS)
|
|
@@ -104,6 +99,9 @@ bin/$(VISUALINFO.BIN): $(VISUALINFO.BIN.OBJS) lib/$(LI
|
|
|
|
%.o: %.c
|
|
$(CC) -c $(CFLAGS) -o $@ $<
|
|
+
|
|
+%.so: %.c
|
|
+ $(CC) -c $(CFLAGS) -fPIC -o $@ $<
|
|
|
|
src/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
|
|
$(CC) $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
|