mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-02 06:03:50 +00:00
Only the shared library needs -fPIC
This commit is contained in:
parent
1412c2db12
commit
0fbfd31ea2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=104926
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user