From: Baruch Siach Date: Wed, 9 Aug 2017 06:43:12 +0000 (+0300) Subject: Makefile: allow linker override for cross uuid test X-Git-Tag: v1.4~18^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f926559acd1beb74dc5dc9b0e414b087110a251f;p=users%2Fsagi%2Fnvme-cli.git Makefile: allow linker override for cross uuid test The test to determine whether libuuid is installed uses the host 'ld' utility. This breaks when cross compiling, since target libraries are often different than host libraries. Use $(LD) instead. This allows to easily use the cross compiler linker. Signed-off-by: Baruch Siach --- diff --git a/Makefile b/Makefile index 3f1d9aaa..cc74bdd6 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ CFLAGS ?= -O2 -g -Wall -Werror CFLAGS += -std=gnu99 CPPFLAGS += -D_GNU_SOURCE -D__CHECK_ENDIAN__ -LIBUUID = $(shell ld -o /dev/null -luuid >/dev/null 2>&1; echo $$?) +LIBUUID = $(shell $(LD) -o /dev/null -luuid >/dev/null 2>&1; echo $$?) NVME = nvme INSTALL ?= install DESTDIR =