From: Thierry Reding Date: Tue, 7 Mar 2017 13:39:03 +0000 (+0100) Subject: tests: fix out-of-tree builds X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=fb96e4f07e61a155213f6ff19633e71c9763bc17;p=qemu-gpiodev%2Flibgpiod.git tests: 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/tests/unit/Makefile.am b/tests/unit/Makefile.am index 05197de..c42286e 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/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 -lkmod -ludev -DEPENDENCIES = libgpiod.la +LDADD = ../../src/lib/libgpiod.la -lkmod -ludev check_PROGRAMS = gpiod-unit