summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@inai.de>2018-11-25 10:20:07 +0100
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2018-11-26 11:24:34 +0200
commit069c65023ab64ac2aefcf6a4254c8b8fac2d9df0 (patch)
tree6377540874200f8e759d824cfa0ae2ff5d0184eb /android
parentbfede2a0861ee7a14f023e7c31d7a59be1d52efc (diff)
downloadbluez-069c65023ab64ac2aefcf6a4254c8b8fac2d9df0.tar.gz
build: -l arguments to belong into LDADD/LIBADD not LDFLAGS
It is an error to put -l arguments into LDFLAGS, because the linker command line is order-sensitive and libs must appear in certain places. For this, automake has the LDADD/LIBADD.
Diffstat (limited to 'android')
-rw-r--r--android/Makefile.am15
1 files changed, 8 insertions, 7 deletions
diff --git a/android/Makefile.am b/android/Makefile.am
index d09a52d69..0f04b6a05 100644
--- a/android/Makefile.am
+++ b/android/Makefile.am
@@ -142,7 +142,8 @@ android_haltest_SOURCES = android/client/haltest.c \
android/hal-utils.h android/hal-utils.c
android_haltest_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/android \
-DPLUGINDIR=\""$(android_plugindir)"\"
-android_haltest_LDFLAGS = -pthread -ldl -lm
+android_haltest_LDFLAGS = -pthread
+android_haltest_LDADD = -ldl -lm
noinst_PROGRAMS += android/android-tester
@@ -165,8 +166,8 @@ android_android_tester_SOURCES = emulator/hciemu.h emulator/hciemu.c \
android_android_tester_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/android \
-DPLUGINDIR=\""$(android_plugindir)"\"
android_android_tester_LDADD = lib/libbluetooth-internal.la \
- src/libshared-glib.la $(GLIB_LIBS)
-android_android_tester_LDFLAGS = -pthread -ldl
+ src/libshared-glib.la $(GLIB_LIBS) -ldl
+android_android_tester_LDFLAGS = -pthread
noinst_PROGRAMS += android/ipc-tester
@@ -194,9 +195,9 @@ android_audio_a2dp_default_la_SOURCES = android/audio-msg.h \
android/system/audio.h
android_audio_a2dp_default_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/android \
$(SBC_CFLAGS)
-android_audio_a2dp_default_la_LIBADD = $(SBC_LIBS)
+android_audio_a2dp_default_la_LIBADD = $(SBC_LIBS) -lrt
android_audio_a2dp_default_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version \
- -no-undefined -pthread -lrt
+ -no-undefined -pthread
plugin_LTLIBRARIES += android/audio.sco.default.la
@@ -210,9 +211,9 @@ android_audio_sco_default_la_SOURCES = android/hal-log.h \
android/audio_utils/resampler.h \
android/system/audio.h
android_audio_sco_default_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/android
-android_audio_sco_default_la_LIBADD = $(SPEEXDSP_LIBS)
+android_audio_sco_default_la_LIBADD = $(SPEEXDSP_LIBS) -lrt
android_audio_sco_default_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version \
- -no-undefined -lrt
+ -no-undefined
unit_tests += android/test-ipc
android_test_ipc_SOURCES = android/test-ipc.c \