From 6679177cde39c1159844d5118c52df7890e20aee Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 23 Apr 2014 15:47:39 -0400 Subject: [PATCH] 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 Signed-off-by: Mike Frysinger --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f3838b4..f2e9a6e 100644 --- a/Makefile +++ b/Makefile @@ -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