$NetBSD: patch-Makefile.in,v 1.8 2020/05/22 08:01:51 adam Exp $ Use LIBTOOL. --- Makefile.in.orig 2020-04-29 18:11:44.000000000 +0000 +++ Makefile.in @@ -25,7 +25,7 @@ PRE_CPPFLAGS = -I. EXTRA_CFLAGS = $(CCPIC) # FIXME: Add configuration of LIBEXT? -LIBTARGETS = @IF_STATIC@ libnettle.a @IF_HOGWEED@ libhogweed.a +LIBTARGETS = @IF_STATIC@ libnettle.la @IF_HOGWEED@ libhogweed.la SHLIBTARGETS = @IF_SHARED@ $(LIBNETTLE_FORLINK) @IF_HOGWEED@ $(LIBHOGWEED_FORLINK) getopt_SOURCES = getopt.c getopt1.c @@ -264,24 +264,24 @@ nettle_OBJS = $(nettle_SOURCES:.c=.$(OBJ hogweed_OBJS = $(hogweed_SOURCES:.c=.$(OBJEXT)) \ $(OPT_HOGWEED_OBJS) @IF_MINI_GMP@ mini-gmp.$(OBJEXT) -libnettle.a: $(nettle_OBJS) - -rm -f $@ - $(AR) $(ARFLAGS) $@ $(nettle_OBJS) - $(RANLIB) $@ +libnettle.la: $(nettle_OBJS) + ${LIBTOOL} --mode=link ${CC} ${LDFLAGS} -o libnettle.la \ + ${nettle_OBJS:.o=.lo} -rpath ${PREFIX}/lib \ + -version-info ${LIBNETTLE_MAJOR}:${LIBNETTLE_MINOR} echo nettle > libnettle.stamp -libhogweed.a: $(hogweed_OBJS) - -rm -f $@ - $(AR) $(ARFLAGS) $@ $(hogweed_OBJS) - $(RANLIB) $@ +libhogweed.la: $(hogweed_OBJS) + ${LIBTOOL} --mode=link ${CC} ${LDFLAGS} -o libhogweed.la \ + ${hogweed_OBJS:.o=.lo} -rpath ${PREFIX}/lib \ + -version-info ${LIBHOGWEED_MAJOR}:${LIBHOGWEED_MINOR} echo hogweed > libhogweed.stamp %.$(OBJEXT): %.asm $(srcdir)/asm.m4 machine.m4 config.m4 $(M4) $(srcdir)/asm.m4 machine.m4 config.m4 $< >$*.s - $(COMPILE) -c $*.s + ${LIBTOOL} --mode=compile $(COMPILE) -c $*.s %.$(OBJEXT): %.c - $(COMPILE) -c $< \ + ${LIBTOOL} --mode=compile $(COMPILE) -c $< \ && $(DEP_PROCESS) # Rules building shared libraries. @@ -481,7 +481,7 @@ install-here: install-doc install-header install-static: $(LIBTARGETS) $(MKDIR_P) $(DESTDIR)$(libdir) for f in $(LIBTARGETS); do \ - $(INSTALL_DATA) $$f $(DESTDIR)$(libdir) ; \ + ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} $$f $(DESTDIR)$(libdir) ; \ done install-dll-nettle: