diff mbox series

[v8,15/15] validation: stop overriding LDADD variable

Message ID 1514944809-29308-16-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v8,1/15] helper: link against libpthread and libodp-linux | expand

Commit Message

Github ODP bot Jan. 3, 2018, 2 a.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


LDADD variable can be used to pass other libraries (like DPDK). Stop
overriding LDADD entirely. Instead use PRELDADD variable or appending to
LDADD.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 377 (lumag:misc-fixes)
 ** https://github.com/Linaro/odp/pull/377
 ** Patch: https://github.com/Linaro/odp/pull/377.patch
 ** Base sha: 49ebafae0edebbc750742d8874ad0a7588286dea
 ** Merge commit sha: c5df42a14c866959ebcb501d64de76a99b6b00d7
 **/
 platform/linux-generic/test/Makefile.inc              | 19 +------------------
 .../linux-generic/test/validation/api/Makefile.inc    |  2 +-
 .../test/validation/api/shmem/Makefile.am             |  9 +--------
 test/Makefile.inc                                     |  5 +++--
 test/validation/api/Makefile.inc                      |  2 ++
 test/validation/api/atomic/Makefile.am                |  1 -
 test/validation/api/barrier/Makefile.am               |  1 -
 test/validation/api/buffer/Makefile.am                |  1 -
 test/validation/api/chksum/Makefile.am                |  1 -
 test/validation/api/classification/Makefile.am        |  1 -
 test/validation/api/cpumask/Makefile.am               |  2 +-
 test/validation/api/crypto/Makefile.am                |  1 -
 test/validation/api/errno/Makefile.am                 |  1 -
 test/validation/api/event/Makefile.am                 |  1 -
 test/validation/api/hash/Makefile.am                  |  1 -
 test/validation/api/init/Makefile.am                  |  3 ---
 test/validation/api/ipsec/Makefile.am                 |  5 +----
 test/validation/api/lock/Makefile.am                  |  1 -
 test/validation/api/packet/Makefile.am                |  1 -
 test/validation/api/pktio/Makefile.am                 |  1 -
 test/validation/api/pool/Makefile.am                  |  1 -
 test/validation/api/queue/Makefile.am                 |  1 -
 test/validation/api/random/Makefile.am                |  1 -
 test/validation/api/scheduler/Makefile.am             |  1 -
 test/validation/api/shmem/Makefile.am                 |  1 -
 test/validation/api/std_clib/Makefile.am              |  1 -
 test/validation/api/system/Makefile.am                |  1 -
 test/validation/api/thread/Makefile.am                |  2 +-
 test/validation/api/time/Makefile.am                  |  1 -
 test/validation/api/timer/Makefile.am                 |  1 -
 test/validation/api/traffic_mngr/Makefile.am          |  2 +-
 31 files changed, 12 insertions(+), 60 deletions(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/test/Makefile.inc b/platform/linux-generic/test/Makefile.inc
index 419a63d1c..c5f6caf03 100644
--- a/platform/linux-generic/test/Makefile.inc
+++ b/platform/linux-generic/test/Makefile.inc
@@ -2,21 +2,4 @@ 
 # build specific ODP applications, (i.e those whose do more than validation
 # test wrapping)
 
-AM_LDFLAGS = -static
-
-AM_CFLAGS = $(CUNIT_CFLAGS)
-
-LIBCUNIT_COMMON = $(top_builddir)/test/common/libcunit_common.la
-LIB   = $(top_builddir)/lib
-LIBODP = $(LIB)/libodphelper.la $(LIB)/libodp-linux.la $(DPDK_LIBS_LT)
-
-INCCUNIT_COMMON = -I$(top_srcdir)/test/common
-INCODP =  \
-	 -I$(top_builddir)/include \
-	 -I$(top_builddir)/platform/@with_platform@/include \
-	 -I$(top_srcdir)/helper/include \
-	 -I$(top_srcdir)/include \
-	 -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
-	 -I$(top_srcdir)/platform/@with_platform@/arch/$(ARCH_DIR) \
-	 -I$(top_srcdir)/platform/@with_platform@/include \
-	 -I$(top_srcdir)/test
+include $(top_srcdir)/test/Makefile.inc
diff --git a/platform/linux-generic/test/validation/api/Makefile.inc b/platform/linux-generic/test/validation/api/Makefile.inc
index c47217d1a..cda6237ea 100644
--- a/platform/linux-generic/test/validation/api/Makefile.inc
+++ b/platform/linux-generic/test/validation/api/Makefile.inc
@@ -1 +1 @@ 
-include $(top_srcdir)/platform/linux-generic/test/validation/Makefile.inc
+include $(top_srcdir)/test/validation/api/Makefile.inc
diff --git a/platform/linux-generic/test/validation/api/shmem/Makefile.am b/platform/linux-generic/test/validation/api/shmem/Makefile.am
index 131a511be..07d311d2f 100644
--- a/platform/linux-generic/test/validation/api/shmem/Makefile.am
+++ b/platform/linux-generic/test/validation/api/shmem/Makefile.am
@@ -7,16 +7,9 @@  test_PROGRAMS = shmem_linux shmem_odp1 shmem_odp2
 shmem_linux_SOURCES = shmem_linux.c shmem_linux.h shmem_common.h
 shmem_linux_CFLAGS = $(AM_CFLAGS) -I$(top_builddir)/include
 shmem_linux_LDFLAGS = $(AM_LDFLAGS) -lrt
+shmem_linux_LDADD =
 
 #shmem_odp1 and shmem_odp2 are the 2 ODP processes:
 shmem_odp1_SOURCES = shmem_odp1.c shmem_odp1.h shmem_common.h
-shmem_odp1_CFLAGS = $(AM_CFLAGS) \
-		   $(INCCUNIT_COMMON) \
-		   $(INCODP)
-shmem_odp1_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
 
 shmem_odp2_SOURCES = shmem_odp2.c shmem_odp2.h shmem_common.h
-shmem_odp2_CFLAGS = $(AM_CFLAGS) \
-		   $(INCCUNIT_COMMON) \
-		   $(INCODP)
-shmem_odp2_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/Makefile.inc b/test/Makefile.inc
index 267c28a26..2086f6061 100644
--- a/test/Makefile.inc
+++ b/test/Makefile.inc
@@ -2,8 +2,9 @@  LIB   = $(top_builddir)/lib
 
 #in the following line, the libs using the symbols should come before
 #the libs containing them! The includer is given a chance to add things
-#before libodp by setting PRE_LDADD before the inclusion.
-LDADD = $(PRE_LDADD) $(LIB)/libodphelper.la $(LIB)/libodp-linux.la $(DPDK_LIBS_LT)
+#before libodp by setting PRELDADD before the inclusion.
+LDADD = $(PRELDADD) $(LIB)/libodphelper.la $(LIB)/libodp-linux.la $(DPDK_LIBS_LT)
+PRELDADD =
 
 INCFLAGS = \
 	-I$(top_builddir)/platform/@with_platform@/include \
diff --git a/test/validation/api/Makefile.inc b/test/validation/api/Makefile.inc
index 6e66301be..e2c856163 100644
--- a/test/validation/api/Makefile.inc
+++ b/test/validation/api/Makefile.inc
@@ -10,3 +10,5 @@  LIBCUNIT_COMMON = $(COMMON_DIR)/libcunit_common.la
 LIBCPUMASK_COMMON = $(COMMON_DIR)/libcpumask_common.la
 LIBTHRMASK_COMMON = $(COMMON_DIR)/libthrmask_common.la
 LIBODP = $(LIB)/libodphelper.la $(LIB)/libodp-linux.la
+
+PRELDADD += $(LIBCUNIT_COMMON)
diff --git a/test/validation/api/atomic/Makefile.am b/test/validation/api/atomic/Makefile.am
index 859e3c51a..4de45970f 100644
--- a/test/validation/api/atomic/Makefile.am
+++ b/test/validation/api/atomic/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = atomic_main
 atomic_main_SOURCES = atomic_main.c atomic.c atomic.h
-atomic_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/barrier/Makefile.am b/test/validation/api/barrier/Makefile.am
index b0310e3a5..aad5ddd60 100644
--- a/test/validation/api/barrier/Makefile.am
+++ b/test/validation/api/barrier/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = barrier_main
 barrier_main_SOURCES = barrier_main.c barrier.c barrier.h
-barrier_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/buffer/Makefile.am b/test/validation/api/buffer/Makefile.am
index 59639ff7b..901fdadc7 100644
--- a/test/validation/api/buffer/Makefile.am
+++ b/test/validation/api/buffer/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = buffer_main
 buffer_main_SOURCES = buffer_main.c buffer.c buffer.h
-buffer_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/chksum/Makefile.am b/test/validation/api/chksum/Makefile.am
index 3227294d4..9bd443857 100644
--- a/test/validation/api/chksum/Makefile.am
+++ b/test/validation/api/chksum/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = chksum_main
 chksum_main_SOURCES = chksum_main.c chksum.c chksum.h
-chksum_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/classification/Makefile.am b/test/validation/api/classification/Makefile.am
index b58703079..303a35767 100644
--- a/test/validation/api/classification/Makefile.am
+++ b/test/validation/api/classification/Makefile.am
@@ -9,4 +9,3 @@  classification_main_SOURCES = classification_main.c \
 				   odp_classification_common.c \
 				   classification.c \
 				   classification.h
-classification_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/cpumask/Makefile.am b/test/validation/api/cpumask/Makefile.am
index ff12f56f7..e5c78d924 100644
--- a/test/validation/api/cpumask/Makefile.am
+++ b/test/validation/api/cpumask/Makefile.am
@@ -2,4 +2,4 @@  include ../Makefile.inc
 
 test_PROGRAMS = cpumask_main
 cpumask_main_SOURCES = cpumask_main.c cpumask.c cpumask.h
-cpumask_main_LDADD = $(LIBCPUMASK_COMMON) $(LIBCUNIT_COMMON) $(LIBODP)
+LDADD += $(LIBCPUMASK_COMMON)
diff --git a/test/validation/api/crypto/Makefile.am b/test/validation/api/crypto/Makefile.am
index 94f1c1cae..238ce1892 100644
--- a/test/validation/api/crypto/Makefile.am
+++ b/test/validation/api/crypto/Makefile.am
@@ -8,4 +8,3 @@  crypto_main_SOURCES = crypto_main.c \
 		      odp_crypto_test_inp.h \
 		      test_vectors.h \
 		      test_vectors_len.h
-crypto_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/errno/Makefile.am b/test/validation/api/errno/Makefile.am
index 9eddfb482..ad5c7ded4 100644
--- a/test/validation/api/errno/Makefile.am
+++ b/test/validation/api/errno/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = errno_main
 errno_main_SOURCES = errno_main.c errno.c errno.h
-errno_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/event/Makefile.am b/test/validation/api/event/Makefile.am
index be4764b58..762f93568 100644
--- a/test/validation/api/event/Makefile.am
+++ b/test/validation/api/event/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = event_main
 event_main_SOURCES = event_main.c event.c event.h
-event_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/hash/Makefile.am b/test/validation/api/hash/Makefile.am
index bd098ffb6..8f0057782 100644
--- a/test/validation/api/hash/Makefile.am
+++ b/test/validation/api/hash/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = hash_main
 hash_main_SOURCES = hash_main.c hash.c hash.h
-hash_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/init/Makefile.am b/test/validation/api/init/Makefile.am
index 522c3a187..2d0661431 100644
--- a/test/validation/api/init/Makefile.am
+++ b/test/validation/api/init/Makefile.am
@@ -7,6 +7,3 @@  test_PROGRAMS = init_main_abort init_main_log init_main_ok
 init_main_abort_SOURCES = init_main_abort.c init.c init.h
 init_main_log_SOURCES   = init_main_log.c init.c init.h
 init_main_ok_SOURCES    = init_main_ok.c init.c init.h
-init_main_abort_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
-init_main_log_LDADD   = $(LIBCUNIT_COMMON) $(LIBODP)
-init_main_ok_LDADD    = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/ipsec/Makefile.am b/test/validation/api/ipsec/Makefile.am
index b300c8e88..328826995 100644
--- a/test/validation/api/ipsec/Makefile.am
+++ b/test/validation/api/ipsec/Makefile.am
@@ -21,7 +21,4 @@  ipsec_async_SOURCES = ipsec_async.c
 ipsec_inline_in_SOURCES = ipsec_inline_in.c
 ipsec_inline_out_SOURCES = ipsec_inline_out.c
 
-ipsec_sync_LDADD = libtestipsec.la $(LIBCUNIT_COMMON) $(LIBODP)
-ipsec_async_LDADD = libtestipsec.la $(LIBCUNIT_COMMON) $(LIBODP)
-ipsec_inline_in_LDADD = libtestipsec.la $(LIBCUNIT_COMMON) $(LIBODP)
-ipsec_inline_out_LDADD = libtestipsec.la $(LIBCUNIT_COMMON) $(LIBODP)
+LDADD += libtestipsec.la
diff --git a/test/validation/api/lock/Makefile.am b/test/validation/api/lock/Makefile.am
index b434fe77c..c5518b3a8 100644
--- a/test/validation/api/lock/Makefile.am
+++ b/test/validation/api/lock/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = lock_main
 lock_main_SOURCES = lock_main.c lock.c lock.h
-lock_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/packet/Makefile.am b/test/validation/api/packet/Makefile.am
index 43300ed0d..d33cdadbd 100644
--- a/test/validation/api/packet/Makefile.am
+++ b/test/validation/api/packet/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = packet_main
 packet_main_SOURCES = packet_main.c packet.c packet.h
-packet_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/pktio/Makefile.am b/test/validation/api/pktio/Makefile.am
index a416fd1da..a6a16e2f0 100644
--- a/test/validation/api/pktio/Makefile.am
+++ b/test/validation/api/pktio/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = pktio_main
 pktio_main_SOURCES = pktio_main.c parser.c parser.h pktio.c pktio.h
-pktio_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/pool/Makefile.am b/test/validation/api/pool/Makefile.am
index 9e7c42b51..7951d0484 100644
--- a/test/validation/api/pool/Makefile.am
+++ b/test/validation/api/pool/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = pool_main
 pool_main_SOURCES = pool_main.c pool.c pool.h
-pool_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/queue/Makefile.am b/test/validation/api/queue/Makefile.am
index 9b1c6b777..5ed4638bc 100644
--- a/test/validation/api/queue/Makefile.am
+++ b/test/validation/api/queue/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = queue_main
 queue_main_SOURCES = queue_main.c queue.c queue.h
-queue_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/random/Makefile.am b/test/validation/api/random/Makefile.am
index e9e7ffc06..8f1ba9fe0 100644
--- a/test/validation/api/random/Makefile.am
+++ b/test/validation/api/random/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = random_main
 random_main_SOURCES = random_main.c random.c random.h
-random_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/scheduler/Makefile.am b/test/validation/api/scheduler/Makefile.am
index 34abf7d6a..3673ad7ce 100644
--- a/test/validation/api/scheduler/Makefile.am
+++ b/test/validation/api/scheduler/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = scheduler_main
 scheduler_main_SOURCES = scheduler_main.c scheduler.c scheduler.h
-scheduler_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/shmem/Makefile.am b/test/validation/api/shmem/Makefile.am
index 8c5d7f700..9a10668f5 100644
--- a/test/validation/api/shmem/Makefile.am
+++ b/test/validation/api/shmem/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = shmem_main
 shmem_main_SOURCES = shmem_main.c shmem.c shmem.h
-shmem_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/std_clib/Makefile.am b/test/validation/api/std_clib/Makefile.am
index dc75c95cf..34b888bbb 100644
--- a/test/validation/api/std_clib/Makefile.am
+++ b/test/validation/api/std_clib/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = std_clib_main
 std_clib_main_SOURCES = std_clib_main.c std_clib.c std_clib.h
-std_clib_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/system/Makefile.am b/test/validation/api/system/Makefile.am
index 123d3a693..e6fbb0ea5 100644
--- a/test/validation/api/system/Makefile.am
+++ b/test/validation/api/system/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = system_main
 system_main_SOURCES = system_main.c system.c system.h
-system_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/thread/Makefile.am b/test/validation/api/thread/Makefile.am
index 1c56574f4..2282169b9 100644
--- a/test/validation/api/thread/Makefile.am
+++ b/test/validation/api/thread/Makefile.am
@@ -3,4 +3,4 @@  include ../Makefile.inc
 test_PROGRAMS = thread_main
 thread_main_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_THRMASK
 thread_main_SOURCES = thread_main.c thread.c thread.h
-thread_main_LDADD = $(LIBTHRMASK_COMMON) $(LIBCUNIT_COMMON) $(LIBODP)
+LDADD += $(LIBTHRMASK_COMMON)
diff --git a/test/validation/api/time/Makefile.am b/test/validation/api/time/Makefile.am
index 669d1226b..4c3340e06 100644
--- a/test/validation/api/time/Makefile.am
+++ b/test/validation/api/time/Makefile.am
@@ -9,7 +9,6 @@  TESTS = $(TESTSCRIPTS)
 
 test_PROGRAMS = time_main
 time_main_SOURCES = time_main.c time.c time_test.h
-time_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
 
 dist_check_SCRIPTS = $(TESTSCRIPTS)
 test_SCRIPTS = $(dist_check_SCRIPTS)
diff --git a/test/validation/api/timer/Makefile.am b/test/validation/api/timer/Makefile.am
index c953dcb34..576174400 100644
--- a/test/validation/api/timer/Makefile.am
+++ b/test/validation/api/timer/Makefile.am
@@ -2,4 +2,3 @@  include ../Makefile.inc
 
 test_PROGRAMS = timer_main
 timer_main_SOURCES = timer_main.c timer.c timer.h
-timer_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/traffic_mngr/Makefile.am b/test/validation/api/traffic_mngr/Makefile.am
index dc4f87092..82996afe0 100644
--- a/test/validation/api/traffic_mngr/Makefile.am
+++ b/test/validation/api/traffic_mngr/Makefile.am
@@ -9,7 +9,7 @@  TESTS = $(TESTSCRIPTS)
 
 test_PROGRAMS = traffic_mngr_main
 traffic_mngr_main_SOURCES = traffic_mngr_main.c traffic_mngr.c traffic_mngr.h
-traffic_mngr_main_LDADD = -lm $(LIBCUNIT_COMMON) $(LIBODP)
+LDADD += -lm
 
 dist_check_SCRIPTS = $(TESTSCRIPTS)
 test_SCRIPTS = $(dist_check_SCRIPTS)