libsigrokdecode: Fix make -j issue with build_runtc
authorKumar Abhishek <abhishek@theembeddedkitchen.net>
Fri, 9 May 2014 21:32:05 +0000 (04:32 +0700)
committerUwe Hermann <uwe@hermann-uwe.de>
Fri, 23 May 2014 21:28:56 +0000 (23:28 +0200)
The build of runtc caused issues with make -j as runtc
was attempted to be linked with libsigrokdecode before
libsigrokdecode was linked. Using LDADD to insert
libsigrokdecode ensures that it links before runtc,
ensuring the build completes correctly.

Makefile.am

index 5c88cc4fd145844e228ca328db420c572825aece..df8fb86d1ae641ef220241269991ba48fd9cd3f5 100644 (file)
@@ -68,10 +68,11 @@ endif
 
 if BUILD_RUNTC
 noinst_PROGRAMS = tests/runtc
 
 if BUILD_RUNTC
 noinst_PROGRAMS = tests/runtc
+tests_runtc_LDADD = $(top_builddir)/libsigrokdecode.la
 tests_runtc_SOURCES = tests/runtc.c
 tests_runtc_CPPFLAGS = $(CPPFLAGS_PYTHON) $(LIBSIGROK_CFLAGS) \
        -DDECODERS_DIR='"$(abs_top_builddir)/decoders"'
 tests_runtc_SOURCES = tests/runtc.c
 tests_runtc_CPPFLAGS = $(CPPFLAGS_PYTHON) $(LIBSIGROK_CFLAGS) \
        -DDECODERS_DIR='"$(abs_top_builddir)/decoders"'
-tests_runtc_LDFLAGS = -L$(top_builddir) $(LIBSIGROK_LIBS) $(LDFLAGS_PYTHON) -lsigrokdecode
+tests_runtc_LDFLAGS = -L$(top_builddir) $(LIBSIGROK_LIBS) $(LDFLAGS_PYTHON)
 endif
 
 MAINTAINERCLEANFILES = ChangeLog
 endif
 
 MAINTAINERCLEANFILES = ChangeLog