From 6ccd7ecc3972105dcbd06f521db5508d4b1856c4 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 6 Mar 2017 23:27:41 +0100 Subject: [PATCH] tools: fix out-of-tree builds When building out of tree, the config.h header file and the libgpiod.la file are generated in the build rather than the source directory. While at it, link to libgpiod.la directly rather than via the -L and -l linker options to enable extra libtool magic. Signed-off-by: Thierry Reding Signed-off-by: Bartosz Golaszewski --- src/tools/Makefile.am | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am index 13626d2..a1fe0b0 100644 --- a/src/tools/Makefile.am +++ b/src/tools/Makefile.am @@ -6,10 +6,9 @@ # as published by the Free Software Foundation. # -AM_CFLAGS = -I$(top_srcdir)/include/ -include $(top_srcdir)/config.h +AM_CFLAGS = -I$(top_srcdir)/include/ -include $(top_builddir)/config.h AM_CFLAGS += -Wall -Wextra -g -LDADD = -lgpiod -L$(top_srcdir)/src/lib -DEPENDENCIES = libgpiod.la +LDADD = ../lib/libgpiod.la bin_PROGRAMS = gpiodetect gpioinfo gpioget gpioset gpiomon gpiofind -- 2.30.2