]> sigrok.org Git - libsigrokdecode.git/commitdiff
Clean up runtc build.
authorBert Vermeulen <redacted>
Wed, 11 Dec 2013 00:21:22 +0000 (01:21 +0100)
committerBert Vermeulen <redacted>
Wed, 11 Dec 2013 00:21:22 +0000 (01:21 +0100)
This only compiles libsigrok into the one target that needs it, instead
of slopping it all over the place.

Makefile.am
configure.ac
tests/Makefile.am

index f9bc14d81b3765d08b4f5d8bb6fb3ebce89ae55e..5227cc3ecb17f86db9b5881368317ebc7c9046c1 100644 (file)
@@ -20,7 +20,7 @@
 
 ACLOCAL_AMFLAGS = -I autostuff
 
-SUBDIRS = contrib tests
+SUBDIRS = contrib tests
 
 lib_LTLIBRARIES = libsigrokdecode.la
 
index 1314dea099434a3dde6d5f88901a6812060a45a1..1728c60bf7e2d5a1f3c08244de01c91311fb17d2 100644 (file)
@@ -124,9 +124,13 @@ PKG_CHECK_MODULES([check], [check >= 0.9.4],
 AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
 
 PKG_CHECK_MODULES([libsigrok], [libsigrok >= 0.2.0],
-    [have_libsigrok="yes"; CFLAGS="$CFLAGS $libsigrok_CFLAGS";
-    LIBS="$LIBS $libsigrok_LIBS"], [have_libsigrok="no"])
+       [have_libsigrok="yes";
+               LIBSIGROK_CFLAGS="$libsigrok_CFLAGS";
+               LIBSIGROK_LIBS="$libsigrok_LIBS"],
+       [have_libsigrok="no"])
 AM_CONDITIONAL(HAVE_LIBSIGROK, test x"$have_libsigrok" = "xyes")
+AC_SUBST([LIBSIGROK_CFLAGS])
+AC_SUBST([LIBSIGROK_LIBS])
 
 # Checks for header files.
 # These are already checked: inttypes.h stdint.h stdlib.h string.h unistd.h.
index 8086b9df3b3e3d964484f28d87a0b7ce62dd715f..7841f055c09bb3dd05af7f4e620cc7d2cab92121 100644 (file)
@@ -41,6 +41,6 @@ endif
 if HAVE_LIBSIGROK
 bin_PROGRAMS = runtc
 runtc_SOURCES = runtc.c
-runtc_CPPFLAGS = $(CPPFLAGS_PYTHON)
-runtc_LDFLAGS = -L/home/bert/sr/lib -lsigrok -lsigrokdecode
+runtc_CPPFLAGS = $(CPPFLAGS_PYTHON) $(LIBSIGROK_CFLAGS)
+runtc_LDFLAGS = $(LIBSIGROK_LIBS) -L$(top_builddir) -lsigrokdecode
 endif