From ff328dcfa5cfc26d2f2411bd26037f8f0fba6251 Mon Sep 17 00:00:00 2001 From: "Peter A. Bigot" Date: Sat, 7 Oct 2017 16:28:30 -0500 Subject: [PATCH] Makefile.am: fix placement of MBTOOLS_LIBS LIBS need to be at the end of the linker line; placing them in LDFLAGS puts them in the wrong order, resulting in diagnostics as documented in issue #4. Signed-off-by: Peter A. Bigot --- src/Makefile.am | 6 +++++- tests/Makefile.am | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 66a769b..51870a3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,7 +14,7 @@ AM_CFLAGS = ${my_CFLAGS} \ -ffunction-sections \ -fdata-sections -AM_LDFLAGS = ${MBTOOLS_LIBS} \ +AM_LDFLAGS = \ -Wl,--gc-sections \ -Wl,--as-needed @@ -28,5 +28,9 @@ mbcollect_SOURCES = \ output.c \ collect.c +mbcollect_LDADD = ${MBTOOLS_LIBS} + mbrecorder_SOURCES = \ recorder.c + +mbrecorder_LDADD = ${MBTOOLS_LIBS} diff --git a/tests/Makefile.am b/tests/Makefile.am index eba139e..22db36c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -9,7 +9,7 @@ AM_CFLAGS = ${my_CFLAGS} \ -ffunction-sections \ -fdata-sections -AM_LDFLAGS = ${MBTOOLS_LIBS} \ +AM_LDFLAGS = \ -Wl,--gc-sections \ -Wl,--as-needed @@ -20,3 +20,5 @@ noinst_PROGRAMS = \ unit_test_server_SOURCES = unit-test-server.c unit_test_client_SOURCES = unit-test-client.c +unit_test_server_LDADD = ${MBTOOLS_LIBS} +unit_test_client_LDADD = ${MBTOOLS_LIBS}