When `./configure --enable-coverage` is given and lcov is present,
MISC_CFLAGS and MISC_LDFLAGS will be set to --coverage. However,
1. obexd uses per-target LDFLAGS and, in doing so, forget to re-mention
$(AM_LDFLAGS). This problem existed for a long time.
2. obexd uses per-target CFLAGS and, in doing so, forgot to re-mention
$(AM_CFLAGS). This got broken in
06dbb223fbe50acc48b3ba1d33cb424275b4baaa.
This led to no --coverage showing up in the linker line for obexd,
causing a link failure indicating unresolved symbols like
__gcov_exit.
Change-Id: I4aca476dd36f1ddc960f8f3c85cb615f9e2d36d3
Signed-off-by: himanshu <h.himanshu@samsung.com>
$(ICAL_LIBS) $(DBUS_LIBS) $(GLIB_LIBS) \
@LIBXML_LIBS@ @INIPARSER_LIBS@ -ldl
-obexd_src_obexd_LDFLAGS = -Wl,--export-dynamic
+obexd_src_obexd_LDFLAGS = $(AM_LDFLAGS) -Wl,--export-dynamic
-obexd_src_obexd_CPPFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS) $(DBUS_CFLAGS) \
+obexd_src_obexd_CPPFLAGS = $(AM_CPPLAGS) $(GLIB_CFLAGS) $(DBUS_CFLAGS) \
@LIBXML_CFLAGS@ @INIPARSER_CFLAGS@ \
$(ICAL_CFLAGS) -DOBEX_PLUGIN_BUILTIN \
-DPLUGINDIR=\""$(obex_plugindir)"\" \
-I$(srcdir)/obexd/src -I$(srcdir)/btio \
-I$(srcdir)/gobex -I$(srcdir)/gdbus
-obexd_src_obexd_CFLAGS = -fPIC
+obexd_src_obexd_CFLAGS = $(AMCFLAGS) -fPIC
endif
android/hal-utils.h android/hal-utils.c
android_haltest_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/android \
-DPLUGINDIR=\""$(android_plugindir)"\"
-android_haltest_LDFLAGS = -pthread
+android_haltest_LDFLAGS = $(AM_LDFLAGS) -pthread
android_haltest_LDADD = -ldl -lm
noinst_PROGRAMS += android/android-tester
-DPLUGINDIR=\""$(android_plugindir)"\"
android_android_tester_LDADD = lib/libbluetooth-internal.la \
src/libshared-glib.la $(GLIB_LIBS) -ldl
-android_android_tester_LDFLAGS = -pthread
+android_android_tester_LDFLAGS = $(AM_LDFLAGS) -pthread
noinst_PROGRAMS += android/ipc-tester