LDFLAGS not taking

Shaun Amott shaun at FreeBSD.org
Fri Dec 29 17:53:05 PST 2006


On Fri, Dec 29, 2006 at 05:31:45PM -0700, Aaron Dalton wrote:
> 
> I am trying to construct a port but cannot seem to get LDFLAGS to take!
>  *grumbles*  The software uses GMAKE and has the following at the top of
> it's Makefile:
> 
> BINDIR=/usr/local/bin
> VERSION=$(shell cat VERSION)
> RELEASE=$(shell sed -n 's/^Release: *\([0-9]*\)/\1/p' mkhexgrid.spec)
> DISTDIR=mkhexgrid-$(VERSION)
> RPMDIR=/home/uckelman/rpmbuild
> CC=g++
> CPPFLAGS=-c -g -O2 -W -Wall -DVERSION='"$(VERSION)"' -I/usr/local/include
> LDFLAGS=-L/usr/local/lib -lm -lstdc++ -lgd
> 

LDFLAGS here overrides anything from the port's Makefile. Use something
like:

post-patch:
	@${REINPLACE_CMD} -e 's/^LDFLAGS=/LDFLAGS+=/' ${WRKSRC}/Makefile

Is LDFLAGS actually referenced elsewhere in the Makefile / other
Makefiles?

-- 
Shaun Amott // PGP: 0x6B387A9A
"A foolish consistency is the hobgoblin
of little minds." - Ralph Waldo Emerson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20061230/38e2e0eb/attachment.pgp


More information about the freebsd-ports mailing list