freebsd-ports/security/cracklib/files/patch-cracklib::Makefile
Kris Kennaway 75ed089359 Build a shared library. This fixes the build of dependent ports on amd64,
which cannot link non-PIC lib.a code into a lib.so.  Also respect CFLAGS
while I'm here, and bump PORTREVISION.

Reviewed by:	maintainer
2004-03-15 21:52:56 +00:00

28 lines
577 B
Text

--- cracklib/Makefile.orig Mon Mar 15 04:45:15 2004
+++ cracklib/Makefile Mon Mar 15 04:45:21 2004
@@ -7,12 +7,24 @@
###
LIB= libcrack.a
+SHLIB= libcrack.so.1
OBJ= fascist.o packlib.o rules.o stringlib.o
-CFLAGS= -O -I../cracklib -DIN_CRACKLIB
+SHOBJ= fascist.So packlib.So rules.So stringlib.So
+CFLAGS+=-I../cracklib -DIN_CRACKLIB
+
+.SUFFIXES: .o .So
+
+.c.So:
+ $(CC) $(CFLAGS) -fPIC -o $*.So -c $?
$(LIB): $(OBJ)
ar rv $(LIB) $?
-ranlib $(LIB)
+
+$(SHLIB): $(SHOBJ)
+ ld -shared -o ${SHLIB} ${SHOBJ}
+
+all: $(LIB) $(SHLIB)
clean:
-rm -f $(OBJ) $(LIB) *~