$NetBSD: patch-ak,v 1.5 2007/05/28 20:14:00 heinz Exp $ --- lib/makefile.src.orig 1992-03-04 20:32:53.000000000 +0100 +++ lib/makefile.src @@ -26,6 +26,9 @@ OBJS = Runput.o buildmap.o cmd_name.o co vaxshort.o \ $(OPT_OBJS) +.c.o: + ${LIBTOOL} --mode=compile ${CC} ${CFLAGS} ${CPPFLAGS} -c ${.IMPSRC} + LIBNAME = librle.a # Just rebuild the object files. @@ -36,40 +39,13 @@ objs: $(OBJS) # is more useful to have a non-debug version than nothing at all.) # Do nothing if $(DEST) is empty (or not defined) install: buildlib - @sh -c "if test '$(DEST)x' != x ; then \ - echo cp $(LIBNAME) $(DEST)/$(LIBNAME) ; \ - cp $(LIBNAME) $(DEST)/$(LIBNAME) ; \ - if test x$(RANLIB) != x ; then \ - echo ranlib $(DEST)/$(LIBNAME) ; \ - ranlib $(DEST)/$(LIBNAME) ; \ - else \ - true ; \ - fi ; \ - if test -d $(DEST)/debug ; then \ - echo cp $(LIBNAME) $(DEST)/debug/$(LIBNAME) ; \ - if test x$(RANLIB) != x ; then \ - cp $(LIBNAME) $(DEST)/debug/$(LIBNAME) ; \ - echo ranlib $(DEST)/debug/$(LIBNAME) ; \ - else \ - true ; \ - fi ; \ - ranlib $(DEST)/debug/$(LIBNAME) ; \ - else \ - true ; \ - fi ; \ - else \ - true ; \ - fi" + ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} ${LIBNAME:.a=.la} ${DESTDIR}${PREFIX}/lib touch install # Rebuild the library from all the .o files. buildlib: $(OBJS) -rm -f $(LIBNAME) - ar rc $(LIBNAME) - ar q $(LIBNAME) $(OBJS) -#ifndef NO_RANLIB - ranlib $(LIBNAME) -#endif + ${LIBTOOL} --mode=link ${CC} -o ${LIBNAME:.a=.la} ${OBJS:.o=.lo} -rpath ${DESTDIR}${PREFIX}/lib -version-info 1:0 touch buildlib # Clean up installed stuff and binaries