summaryrefslogtreecommitdiffstats
path: root/devel/libds
diff options
context:
space:
mode:
authorarved <arved@FreeBSD.org>2004-03-22 12:57:41 +0000
committerarved <arved@FreeBSD.org>2004-03-22 12:57:41 +0000
commit35820761b88767da6a4f525a8b7a11cfca3e552a (patch)
tree66c997b35ada577b7782a6e4704c9258ab526185 /devel/libds
parent51413d6a410ad0cbd4e8ba0ef0f9f27c59f3f68c (diff)
downloadFreeBSD-ports-35820761b88767da6a4f525a8b7a11cfca3e552a.zip
FreeBSD-ports-35820761b88767da6a4f525a8b7a11cfca3e552a.tar.gz
Only the shared library needs -fPIC
Diffstat (limited to 'devel/libds')
-rw-r--r--devel/libds/Makefile4
-rw-r--r--devel/libds/files/patch-Makefile43
2 files changed, 40 insertions, 7 deletions
diff --git a/devel/libds/Makefile b/devel/libds/Makefile
index da9d186..4066daa 100644
--- a/devel/libds/Makefile
+++ b/devel/libds/Makefile
@@ -24,10 +24,6 @@ MAN3= libds.3
HTML= avltree.html heap.html parray.html set.html hashtbl.html \
index.html queue.html stack.html
-.if ${ARCH} == "amd64"
-CFLAGS+= -fPIC
-.endif
-
# Copy header file and libraries.
do-install:
${INSTALL_DATA} ${WRKSRC}/ds.h ${PREFIX}/include
diff --git a/devel/libds/files/patch-Makefile b/devel/libds/files/patch-Makefile
index 90e1ca2..1525642 100644
--- a/devel/libds/files/patch-Makefile
+++ b/devel/libds/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Sun Oct 19 01:56:50 2003
-+++ Makefile Sun Oct 19 01:56:43 2003
+--- Makefile.orig Fri Oct 25 09:21:06 2002
++++ Makefile Mon Mar 22 13:55:27 2004
@@ -5,8 +5,8 @@
# Makefile for LibDS 2.0
#
@@ -11,7 +11,23 @@
CCEXTRAFLAGS = -DStandAlone
-@@ -42,7 +42,7 @@
+@@ -15,13 +15,14 @@
+
+ INCLUDEFLAGS = -I$(INCLUDEDIR) -I. -I..
+
+-.SUFFIXES: .e .o
++.SUFFIXES: .e .o .So
+
+
+ LIBTARGET = libds
+ LIBHEADER = ds.h
+ HEADERS =
+ OBJ = avltree.o hashtbl.o heap.o parray.o queue.o stack.o set.o
++SH_OBJ = avltree.So hashtbl.So heap.So parray.So queue.So stack.So set.So
+
+ LINC = -I../include -I../../include
+ ARLIB = $(LIBTARGET).a
+@@ -42,7 +43,7 @@
$(TARGET)
gcc:
@@ -20,3 +36,24 @@
-Wnested-externs -Wwrite-strings -Wpointer-arith \
-Wmissing-declarations -Wredundant-decls -Winline \
-Wstrict-prototypes" SHARED="-shared" release
+@@ -52,9 +53,9 @@
+ unix:
+ @-$(MAKE) CCOPTFLAGS="-O" release
+
+-$(ARLIB): $(OBJ)
++$(ARLIB): $(OBJ) $(SH_OBJ)
+ ar r $(ARLIB) $(OBJ); ranlib $(ARLIB);\
+- ld $(SHARED) -o $(SOLIB) $(OBJ) -lc
++ ld $(SHARED) -o $(SOLIB) $(SH_OBJ) -lc
+
+ install-dummy:
+ install -m 664 -D libds.so /usr/local/lib/libds.so.2.0; \
+@@ -66,6 +67,8 @@
+ $(CC) $(INCLUDEFLAGS) $(LINC) $(CPPFLAGS) $(CCFLAGS) -c $*.c
+ .c.e:
+ $(CC) -E $(INCLUDEFLAGS) $(LINC) $(CPPFLAGS) $(CCFLAGS) $*.c > $@
++.c.So:
++ $(CC) $(INCLUDEFLAGS) $(LINC) $(CPPFLAGS) $(CCFLAGS) -fPIC -c $*.c -o $*.So
+
+ .PHONY: clean
+
OpenPOWER on IntegriCloud