From 946e89965bc0036bf3738ea9dd67191c31c9b4a2 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Wed, 8 Feb 2017 14:35:04 +0100 Subject: [PATCH] make: use LDADD instead of AM_LDFLAGS when linking against libgpiod Libtool tends to have problems (especially with C++) when the variables are used incorrectly. When building tools, specify the library we want to link against using LDADD. Signed-off-by: Bartosz Golaszewski --- src/tools/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am index 23c989c..13626d2 100644 --- a/src/tools/Makefile.am +++ b/src/tools/Makefile.am @@ -7,8 +7,8 @@ # AM_CFLAGS = -I$(top_srcdir)/include/ -include $(top_srcdir)/config.h -AM_CFLAGS += -Wall -Wextra -g -L$(top_srcdir)/src/lib -AM_LDFLAGS = -lgpiod +AM_CFLAGS += -Wall -Wextra -g +LDADD = -lgpiod -L$(top_srcdir)/src/lib DEPENDENCIES = libgpiod.la bin_PROGRAMS = gpiodetect gpioinfo gpioget gpioset gpiomon gpiofind -- 2.30.2