$NetBSD: patch-ag,v 1.5 2010/02/02 17:09:28 tnn Exp $ --- modules/pammodutil/Makefile.orig 2001-12-09 22:15:12.000000000 +0000 +++ 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) --tag=CC --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) --tag=CC --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