From: Thierry Reding Date: Mon, 6 Mar 2017 22:27:41 +0000 (+0100) Subject: tools: fix out-of-tree builds X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6ccd7ecc3972105dcbd06f521db5508d4b1856c4;p=qemu-gpiodev%2Flibgpiod.git 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 --- 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