From: Thierry Reding Date: Mon, 6 Mar 2017 22:35:36 +0000 (+0100) Subject: tools: build convenience library X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d74f84344ebe6a41cd70f7a013e3d7d517e1f52a;p=qemu-gpiodev%2Flibgpiod.git tools: build convenience library Build a convenience library to avoid having to add the tools-common.c source file for each of the tools. This also has the side-effect of fixing 'make distcheck' because the tools-common.h header file is now included in the source tarball. Signed-off-by: Thierry Reding Signed-off-by: Bartosz Golaszewski --- diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am index a1fe0b0..68699b5 100644 --- a/src/tools/Makefile.am +++ b/src/tools/Makefile.am @@ -8,18 +8,24 @@ AM_CFLAGS = -I$(top_srcdir)/include/ -include $(top_builddir)/config.h AM_CFLAGS += -Wall -Wextra -g -LDADD = ../lib/libgpiod.la + +noinst_LTLIBRARIES = libtools-common.la +libtools_common_la_SOURCES = \ + tools-common.c \ + tools-common.h + +LDADD = ../lib/libgpiod.la libtools-common.la bin_PROGRAMS = gpiodetect gpioinfo gpioget gpioset gpiomon gpiofind -gpiodetect_SOURCES = gpiodetect.c tools-common.c +gpiodetect_SOURCES = gpiodetect.c -gpioinfo_SOURCES = gpioinfo.c tools-common.c +gpioinfo_SOURCES = gpioinfo.c -gpioget_SOURCES = gpioget.c tools-common.c +gpioget_SOURCES = gpioget.c -gpioset_SOURCES = gpioset.c tools-common.c +gpioset_SOURCES = gpioset.c -gpiomon_SOURCES = gpiomon.c tools-common.c +gpiomon_SOURCES = gpiomon.c -gpiofind_SOURCES = gpiofind.c tools-common.c +gpiofind_SOURCES = gpiofind.c