$NetBSD: patch-ab,v 1.9 2000/08/10 10:44:10 wiz Exp $ --- Makefile.common.orig Fri Aug 4 02:17:52 2000 +++ Makefile.common Thu Aug 10 12:16:47 2000 @@ -68,7 +68,7 @@ # Note that the user may have configured -I options into CFLAGS. $(CC) -c $(INCLUDE) $(CFLAGS) -o $@ $< -LIBOPT = $(SRCDIR)/libopt +LIBOPT = /bin/echo # XXX must exist, can't be ${ECHO} (shell builtin) # Rules for conventional single-object file executables $(PORTBINARIES): %: %.o $(NETPBMLIBS) $(LIBOPT) @@ -103,7 +103,7 @@ $(LIBOBJECTS): %.o: %.c # Note that the user may have configured -I options into CFLAGS. - $(CC) -c $(INCLUDE) $(CFLAGS) $(CFLAGS_SHLIB) -o $@ $< + $(LIBTOOL) $(CC) -c $(INCLUDE) $(CFLAGS) $(CFLAGS_SHLIB) $< SONAME = lib$(LIBROOT).so.$(MAJ) @@ -123,10 +123,8 @@ `$(LIBOPT) $(LIBLIBS)` -lc # Static library. Unused by default, but with a small change to make files... -lib$(LIBROOT).a: $(LIBOBJECTS) $(LIBOBJECTS_X) - -rm -f $@ - ar rc $@ $(LIBOBJECTS) $(LIBOBJECTS_X) - -ranlib $@ +lib$(LIBROOT).la: $(LIBOBJECTS) $(LIBOBJECTS_X) + $(LIBTOOL) --mode=link $(CC) -rpath $(PREFIX)/lib -version-info $(MAJ):$(MIN) -o $@ $(LIBOBJECTS:.o=.lo) $(LIBOBJECTS_X:.o=.lo) # Some maintenance notes about $(INSTALL): Some install programs can # install multiple files in one shot; others can take only one file at @@ -169,7 +167,7 @@ # Make and Install know that pbmmake.exe counts as pbmmake. for x in $(BINARIES); \ do \ - $(INSTALL) -c -s -m $(INSTALL_PERM_BIN) $$x $(INSTALLBINARIES); \ + $(LIBTOOL) --mode=install $(INSTALL) -c -s -m $(INSTALL_PERM_BIN) $$x $(INSTALLBINARIES); \ done .PHONY: install.script @@ -222,8 +220,8 @@ # built. So if you later do a make install.staticlib, the dependency # here causes the static library to be built at that time. .PHONY: install.staticlib -install.staticlib: lib$(LIBROOT).a - $(INSTALL) -c -m $(INSTALL_PERM_LIBS) $< $(INSTALLLIBS)/$< +install.staticlib: lib$(LIBROOT).la + $(LIBTOOL) --mode=install $(BSD_INSTALL_DATA) lib$(LIBROOT).la $(PREFIX)/lib .PHONY: install.lib.common # install a shared library @@ -235,7 +233,7 @@ .PHONY: clean.common clean.common: - -rm -f *.o *.o2 *.a *.so* *.cat *~ core *.core *.i *.s merge.h \ + -rm -f *.o *.o2 *.la *.so* *.cat *~ core *.core *.i *.s merge.h \ $(BINARIES) $(MERGENAME) .PHONY: dep