Subject: Re: bsd.lib.mk - little feature request
To: Ian Zagorskih <ianzag@megasignal.com>
From: Simon J. Gerraty <sjg@crufty.net>
List: tech-userlevel
Date: 04/07/2004 16:14:51
>The problem is that sometimes I need to link some libs as whole and some as 
>references. Wouldn't it be good to add something like LDADD_STATIC and change 
>ld's call like:

>	${CC} -Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} -o ${.TARGET} \
>	    ${_LIBLDOPTS} \
>	    -Wl,--whole-archive ${SOLIB} ${LDADD_STATIC} -Wl,--no-whole-archive 
>${LDADD}

>so i can do Makefile like:

>LDADD+=  -lfoo1
>LDADD_STATIC += lfoo2

Have you tried:

LDADD+= ${LIBFOO2}

where LIBFOO2 is the fullpath to libfoo2.a ?  That's what I've
used in similar cases (not sure about on netbsd 1.6 - though I think so).

--sjg