diff options
author | Bert Vermeulen <bert@biot.com> | 2013-12-11 01:21:22 +0100 |
---|---|---|
committer | Bert Vermeulen <bert@biot.com> | 2013-12-11 01:21:22 +0100 |
commit | f8c88ebc5b33052de0b88690577af4611aa3709a (patch) | |
tree | 075e5a7ac9c81329558c8ac755206bafe645ecb1 | |
parent | fbd226c3f70f20fdf3cbfd43a671bf2bcc5d23e6 (diff) | |
download | libsigrokdecode-f8c88ebc5b33052de0b88690577af4611aa3709a.tar.gz libsigrokdecode-f8c88ebc5b33052de0b88690577af4611aa3709a.zip |
Clean up runtc build.
This only compiles libsigrok into the one target that needs it, instead
of slopping it all over the place.
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | tests/Makefile.am | 4 |
3 files changed, 9 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am index f9bc14d..5227cc3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,7 +20,7 @@ ACLOCAL_AMFLAGS = -I autostuff -SUBDIRS = contrib tests +SUBDIRS = . contrib tests lib_LTLIBRARIES = libsigrokdecode.la diff --git a/configure.ac b/configure.ac index 1314dea..1728c60 100644 --- a/configure.ac +++ b/configure.ac @@ -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. diff --git a/tests/Makefile.am b/tests/Makefile.am index 8086b9d..7841f05 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 |