From fb96e4f07e61a155213f6ff19633e71c9763bc17 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Tue, 7 Mar 2017 14:39:03 +0100 Subject: [PATCH] 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 --- tests/unit/Makefile.am | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 -- 2.30.2