build: Libify gobex
Subsystems (2)
Luiz Augusto von Dentz
maintainerPATCH 1/2 build: Libify gobex
From: Luiz Augusto von Dentz <[email protected]>
This enables tools/binaries to link directly with libgobex-internal.la so gobex only need to be compiled once.
--- Makefile.am | 35 ++++++++++++++++++----------------- Makefile.obexd | 4 ++-- Makefile.tools | 13 +++++++------ 3 files changed, 27 insertions(+), 25 deletions(-)
Makefile.am +18 -17
@@ -102,12 +102,14 @@ attrib_sources = attrib/att.h attrib/att-database.h attrib/att.c \ btio_sources = btio/btio.h btio/btio.c -gobex_sources = gobex/gobex.h gobex/gobex.c \ - gobex/gobex-defs.h gobex/gobex-defs.c \ - gobex/gobex-packet.c gobex/gobex-packet.h \ - gobex/gobex-header.c gobex/gobex-header.h \ - gobex/gobex-transfer.c gobex/gobex-debug.h \ - gobex/gobex-apparam.c gobex/gobex-apparam.h +noinst_LTLIBRARIES += gobex/libgobex-internal.la + +gobex_libgobex_internal_la_SOURCES = gobex/gobex.h gobex/gobex.c \ + gobex/gobex-defs.h gobex/gobex-defs.c \ + gobex/gobex-packet.c gobex/gobex-packet.h \ + gobex/gobex-header.c gobex/gobex-header.h \ + gobex/gobex-transfer.c gobex/gobex-debug.h \ + gobex/gobex-apparam.c gobex/gobex-apparam.h builtin_modules = builtin_sources =
@@ -258,25 +260,24 @@ unit_test_gdbus_client_LDADD = gdbus/libgdbus-internal.la \ unit_tests += unit/test-gobex-header unit/test-gobex-packet unit/test-gobex \ unit/test-gobex-transfer unit/test-gobex-apparam -unit_test_gobex_SOURCES = $(gobex_sources) unit/util.c unit/util.h \ - unit/test-gobex.c -unit_test_gobex_LDADD = @GLIB_LIBS@ +unit_test_gobex_SOURCES = unit/util.c unit/util.h unit/test-gobex.c +unit_test_gobex_LDADD = gobex/libgobex-internal.la @GLIB_LIBS@ -unit_test_gobex_packet_SOURCES = $(gobex_sources) unit/util.c unit/util.h \ +unit_test_gobex_packet_SOURCES = unit/util.c unit/util.h \ unit/test-gobex-packet.c -unit_test_gobex_packet_LDADD = @GLIB_LIBS@ +unit_test_gobex_packet_LDADD = gobex/libgobex-internal.la @GLIB_LIBS@ -unit_test_gobex_header_SOURCES = $(gobex_sources) unit/util.c unit/util.h \ +unit_test_gobex_header_SOURCES = unit/util.c unit/util.h \ unit/test-gobex-header.c -unit_test_gobex_header_LDADD = @GLIB_LIBS@ +unit_test_gobex_header_LDADD = gobex/libgobex-internal.la @GLIB_LIBS@ -unit_test_gobex_transfer_SOURCES = $(gobex_sources) unit/util.c unit/util.h \ +unit_test_gobex_transfer_SOURCES = unit/util.c unit/util.h \ unit/test-gobex-transfer.c -unit_test_gobex_transfer_LDADD = @GLIB_LIBS@ +unit_test_gobex_transfer_LDADD = gobex/libgobex-internal.la @GLIB_LIBS@ -unit_test_gobex_apparam_SOURCES = $(gobex_sources) unit/util.c unit/util.h \ +unit_test_gobex_apparam_SOURCES = unit/util.c unit/util.h \ unit/test-gobex-apparam.c -unit_test_gobex_apparam_LDADD = @GLIB_LIBS@ +unit_test_gobex_apparam_LDADD = gobex/libgobex-internal.la @GLIB_LIBS@ unit_tests += unit/test-lib
Makefile.obexd +2 -2
@@ -54,8 +54,7 @@ obexd_builtin_sources += obexd/client/mns.c obexd/src/map_ap.h \ libexec_PROGRAMS += obexd/src/obexd -obexd_src_obexd_SOURCES = $(btio_sources) $(gobex_sources) \ - $(obexd_builtin_sources) \ +obexd_src_obexd_SOURCES = $(btio_sources) $(obexd_builtin_sources) \ obexd/src/main.c obexd/src/obexd.h \ obexd/src/plugin.h obexd/src/plugin.c \ obexd/src/log.h obexd/src/log.c \
@@ -81,6 +80,7 @@ obexd_src_obexd_SOURCES = $(btio_sources) $(gobex_sources) \ obexd/src/map_ap.h obexd_src_obexd_LDADD = lib/libbluetooth-internal.la \ gdbus/libgdbus-internal.la \ + gobex/libgobex-internal.la \ @ICAL_LIBS@ @DBUS_LIBS@ @GLIB_LIBS@ -ldl obexd_src_obexd_LDFLAGS = -Wl,--export-dynamic
Makefile.tools +7 -6
@@ -227,14 +227,15 @@ attrib_gatttool_SOURCES = attrib/gatttool.c attrib/att.c attrib/gatt.c \ client/display.h attrib_gatttool_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@ -lreadline -tools_obex_client_tool_SOURCES = $(gobex_sources) $(btio_sources) \ - tools/obex-client-tool.c +tools_obex_client_tool_SOURCES = $(btio_sources) tools/obex-client-tool.c tools_obex_client_tool_LDADD = lib/libbluetooth-internal.la \ - @GLIB_LIBS@ -lreadline + gobex/libgobex-internal.la \ + @GLIB_LIBS@ -lreadline -tools_obex_server_tool_SOURCES = $(gobex_sources) $(btio_sources) \ - tools/obex-server-tool.c -tools_obex_server_tool_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@ +tools_obex_server_tool_SOURCES = $(btio_sources) tools/obex-server-tool.c +tools_obex_server_tool_LDADD = lib/libbluetooth-internal.la \ + gobex/libgobex-internal.la \ + @GLIB_LIBS@ tools_bluetooth_player_SOURCES = tools/bluetooth-player.c \ client/display.h client/display.c
Signature · 1 line
1.8.3.1
Luiz Augusto von Dentz
maintainerPATCH 2/2 build: Libify btio
From: Luiz Augusto von Dentz <[email protected]>
This enables tools/binaries to link directly with libbtio-internal.la so btio only need to be compiled once.
--- Makefile.am | 13 ++++++++----- Makefile.obexd | 3 ++- Makefile.tools | 24 ++++++++++++++---------- 3 files changed, 24 insertions(+), 16 deletions(-)
Makefile.am +8 -5
@@ -100,7 +100,9 @@ attrib_sources = attrib/att.h attrib/att-database.h attrib/att.c \ attrib/gattrib.h attrib/gattrib.c \ attrib/gatt-service.h attrib/gatt-service.c -btio_sources = btio/btio.h btio/btio.c +noinst_LTLIBRARIES += btio/libbtio-internal.la + +btio_libbtio_internal_la_SOURCES = btio/btio.h btio/btio.c noinst_LTLIBRARIES += gobex/libgobex-internal.la
@@ -127,8 +129,7 @@ endif libexec_PROGRAMS += src/bluetoothd -src_bluetoothd_SOURCES = $(builtin_sources) \ - $(attrib_sources) $(btio_sources) \ +src_bluetoothd_SOURCES = $(builtin_sources) $(attrib_sources) \ src/bluetooth.ver \ src/main.c src/log.h src/log.c \ src/systemd.h src/systemd.c \
@@ -154,12 +155,14 @@ src_bluetoothd_SOURCES = $(builtin_sources) \ src/shared/util.h src/shared/util.c \ src/shared/mgmt.h src/shared/mgmt.c src_bluetoothd_LDADD = lib/libbluetooth-internal.la gdbus/libgdbus-internal.la \ - @GLIB_LIBS@ @DBUS_LIBS@ -ldl -lrt + btio/libbtio-internal.la @GLIB_LIBS@ @DBUS_LIBS@ -ldl \ + -lrt src_bluetoothd_LDFLAGS = $(AM_LDFLAGS) -Wl,--export-dynamic \ -Wl,--version-script=$(srcdir)/src/bluetooth.ver src_bluetoothd_DEPENDENCIES = lib/libbluetooth-internal.la \ - gdbus/libgdbus-internal.la src/bluetooth.service + gdbus/libgdbus-internal.la \ + btio/libbtio-internal.la src/bluetooth.service src_bluetoothd_CFLAGS = $(AM_CFLAGS) -DBLUETOOTH_PLUGIN_BUILTIN \ -DPLUGINDIR=\""$(build_plugindir)"\"
Makefile.obexd +2 -1
@@ -54,7 +54,7 @@ obexd_builtin_sources += obexd/client/mns.c obexd/src/map_ap.h \ libexec_PROGRAMS += obexd/src/obexd -obexd_src_obexd_SOURCES = $(btio_sources) $(obexd_builtin_sources) \ +obexd_src_obexd_SOURCES = $(obexd_builtin_sources) \ obexd/src/main.c obexd/src/obexd.h \ obexd/src/plugin.h obexd/src/plugin.c \ obexd/src/log.h obexd/src/log.c \
@@ -81,6 +81,7 @@ obexd_src_obexd_SOURCES = $(btio_sources) $(obexd_builtin_sources) \ obexd_src_obexd_LDADD = lib/libbluetooth-internal.la \ gdbus/libgdbus-internal.la \ gobex/libgobex-internal.la \ + btio/libbtio-internal.la \ @ICAL_LIBS@ @DBUS_LIBS@ @GLIB_LIBS@ -ldl obexd_src_obexd_LDFLAGS = -Wl,--export-dynamic
Makefile.tools +14 -10
@@ -203,8 +203,9 @@ tools_btsnoop_SOURCES = tools/btsnoop.c \ src/shared/pcap.h src/shared/pcap.c \ src/shared/btsnoop.h src/shared/btsnoop.c -tools_btiotest_SOURCES = tools/btiotest.c btio/btio.h btio/btio.c -tools_btiotest_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@ +tools_btiotest_SOURCES = tools/btiotest.c +tools_btiotest_LDADD = btio/libbtio-internal.la lib/libbluetooth-internal.la \ + @GLIB_LIBS@ tools_mpris_player_SOURCES = tools/mpris-player.c tools_mpris_player_LDADD = gdbus/libgdbus-internal.la @GLIB_LIBS@ @DBUS_LIBS@
@@ -221,19 +222,22 @@ noinst_PROGRAMS += attrib/gatttool \ tools/bluetooth-player tools/obexctl attrib_gatttool_SOURCES = attrib/gatttool.c attrib/att.c attrib/gatt.c \ - attrib/gattrib.c btio/btio.c \ - attrib/gatttool.h attrib/interactive.c \ - attrib/utils.c src/log.c client/display.c \ + attrib/gattrib.c attrib/gatttool.h \ + attrib/interactive.c attrib/utils.c \ + src/log.c client/display.c \ client/display.h -attrib_gatttool_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@ -lreadline +attrib_gatttool_LDADD = lib/libbluetooth-internal.la btio/libbtio-internal.la \ + @GLIB_LIBS@ -lreadline -tools_obex_client_tool_SOURCES = $(btio_sources) tools/obex-client-tool.c -tools_obex_client_tool_LDADD = lib/libbluetooth-internal.la \ +tools_obex_client_tool_SOURCES = tools/obex-client-tool.c +tools_obex_client_tool_LDADD = btio/libbtio-internal.la \ + lib/libbluetooth-internal.la \ gobex/libgobex-internal.la \ @GLIB_LIBS@ -lreadline -tools_obex_server_tool_SOURCES = $(btio_sources) tools/obex-server-tool.c -tools_obex_server_tool_LDADD = lib/libbluetooth-internal.la \ +tools_obex_server_tool_SOURCES = tools/obex-server-tool.c +tools_obex_server_tool_LDADD = btio/libbtio-internal.la \ + lib/libbluetooth-internal.la \ gobex/libgobex-internal.la \ @GLIB_LIBS@
Signature · 1 line
1.8.3.1