use LDLIBS for linker flags

When you put -lfoo into the dependency line of make, it forces it to
search /lib and /usr/lib for files to link against.  This can cause
problems when trying to cross-compile or build for different ABIs.
Use the standard LDLIBS variable instead.

URL: https://bugs.gentoo.org/505760
Reported-by: Georgi Georgiev <chutzimir@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger 2014-04-23 15:47:39 -04:00 committed by Jan Synacek
parent 67cdd29756
commit 6679177cde
1 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,8 @@ docdir := ${prefix}/share/doc
all: numad
numad: numad.o -lpthread -lrt -lm
LDLIBS := -lpthread -lrt -lm
numad: numad.o
AR ?= ar
RANLIB ?= ranlib