$NetBSD: patch-aa,v 1.1 2011/03/10 09:52:25 drochner Exp $ --- makefile.shared.orig 2010-07-23 14:27:20.000000000 +0000 +++ makefile.shared @@ -3,7 +3,7 @@ #Tom St Denis VERSION=0:41 -CC = libtool --mode=compile --tag=CC gcc +#CC = libtool --mode=compile --tag=CC gcc CFLAGS += -I./ -Wall -W -Wshadow -Wsign-compare @@ -48,8 +48,8 @@ HEADERS=tommath.h tommath_class.h tommat #INCPATH-The directory to install the header files for libtommath. #DATAPATH-The directory to install the pdf docs. DESTDIR= -LIBPATH=/usr/lib -INCPATH=/usr/include +LIBPATH=${PREFIX}/lib +INCPATH=${PREFIX}/include DATAPATH=/usr/share/doc/libtommath/pdf OBJECTS=bncore.o bn_mp_init.o bn_mp_clear.o bn_mp_exch.o bn_mp_grow.o bn_mp_shrink.o \ @@ -82,8 +82,12 @@ bn_mp_to_signed_bin_n.o bn_mp_to_unsigne objs: $(OBJECTS) -$(LIBNAME): $(OBJECTS) - libtool --mode=link gcc *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION) +.SUFFIXES: .lo +.c.lo: + ${LIBTOOL} --mode=compile ${CC} -c ${CFLAGS} $< -o $@ + +$(LIBNAME): $(OBJECTS:.o=.lo) + libtool --mode=link ${CC} *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION) install: $(LIBNAME) install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)