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 <treding@nvidia.com>
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
# 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