pkgsrc/security/PAM/patches/patch-ag

53 lines
1.4 KiB
Text
Raw Normal View History

$NetBSD: patch-ag,v 1.4 2004/11/16 07:46:57 jlam Exp $
--- modules/pammodutil/Makefile.orig 2001-12-09 17:15:12.000000000 -0500
+++ modules/pammodutil/Makefile
@@ -25,10 +25,15 @@ LIBSTATIC = $(LIBNAME).a
SLIBOBJECTS = $(addprefix static/,$(LIBOBJECTS) $(STATICOBJ))
+# libtool library name
+LIBLIBTOOL = $(LIBNAME).la
+
+LALIBOBJECTS = $(LIBOBJECTS:.o=.lo)
+
# ---------------------------------------------
## rules
-all: dirs $(LIBSTATIC) ../../Make.Rules
+all: dirs $(LIBLIBTOOL) ../../Make.Rules
dirs:
$(MKDIR) static
@@ -36,10 +41,19 @@ dirs:
static/%.o : %.c
$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
+%.lo: %.c
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $<
+
$(LIBSTATIC): $(SLIBOBJECTS)
ar cr $@ $(SLIBOBJECTS)
$(RANLIB) $@
+# This is a libtool convenience library that may be linked into shared
+# libraries and modules.
+#
+$(LIBLIBTOOL): $(LALIBOBJECTS)
+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(LALIBOBJECTS) -o $@
+
install:
@echo "at this time, we're not installing $(LIBSTATIC)"
@@ -47,7 +61,8 @@ remove:
@echo "at this time, there is nothing to remove"
clean:
- rm -f a.out core *~ static/*.o
- rm -f *.a *.o
+ rm -f a.out core *~ static/*.o .libs/*
+ rm -f *.a *.la *.la *.o
if [ -d dynamic ]; then rmdir dynamic ; fi
if [ -d static ]; then rmdir static ; fi
+ if [ -d libs ]; then rmdir .libs; fi