2002-03-09 05:10:06 +08:00
|
|
|
|
2009-08-17 05:52:28 +08:00
|
|
|
AM_MAKEFLAGS = --no-print-directory
|
|
|
|
|
2009-08-23 15:40:59 +08:00
|
|
|
lib_LTLIBRARIES =
|
|
|
|
|
2011-07-21 05:47:49 +08:00
|
|
|
noinst_LIBRARIES =
|
|
|
|
|
2009-08-23 15:40:59 +08:00
|
|
|
noinst_LTLIBRARIES =
|
|
|
|
|
|
|
|
bin_PROGRAMS =
|
|
|
|
|
2012-12-05 06:38:48 +08:00
|
|
|
libexec_PROGRAMS =
|
|
|
|
|
2009-08-23 15:40:59 +08:00
|
|
|
noinst_PROGRAMS =
|
|
|
|
|
|
|
|
dist_man_MANS =
|
|
|
|
|
|
|
|
dist_noinst_MANS =
|
|
|
|
|
|
|
|
CLEANFILES =
|
|
|
|
|
|
|
|
EXTRA_DIST =
|
|
|
|
|
|
|
|
includedir = @includedir@/bluetooth
|
|
|
|
|
|
|
|
include_HEADERS =
|
|
|
|
|
2012-05-09 20:06:17 +08:00
|
|
|
AM_CFLAGS = $(WARNING_CFLAGS) $(MISC_CFLAGS)
|
|
|
|
AM_LDFLAGS = $(MISC_LDFLAGS)
|
|
|
|
|
2011-07-02 11:35:10 +08:00
|
|
|
if DATAFILES
|
2009-08-25 03:42:37 +08:00
|
|
|
dbusdir = $(sysconfdir)/dbus-1/system.d
|
2012-05-18 01:00:27 +08:00
|
|
|
dbusservicedir = $(datadir)/dbus-1/system-services
|
2009-08-25 03:42:37 +08:00
|
|
|
|
|
|
|
dbus_DATA = src/bluetooth.conf
|
2012-05-18 01:00:27 +08:00
|
|
|
dbusservice_DATA = src/org.bluez.service
|
2009-08-25 03:42:37 +08:00
|
|
|
|
2009-08-23 15:40:59 +08:00
|
|
|
confdir = $(sysconfdir)/bluetooth
|
|
|
|
|
|
|
|
conf_DATA =
|
|
|
|
|
2009-08-25 03:42:37 +08:00
|
|
|
statedir = $(localstatedir)/lib/bluetooth
|
|
|
|
|
|
|
|
state_DATA =
|
2011-07-02 11:35:12 +08:00
|
|
|
|
|
|
|
if SYSTEMD
|
|
|
|
systemdunitdir = @SYSTEMD_UNITDIR@
|
|
|
|
|
|
|
|
systemdunit_DATA = src/bluetooth.service
|
|
|
|
endif
|
2009-08-25 03:42:37 +08:00
|
|
|
endif
|
|
|
|
|
2012-12-09 18:19:53 +08:00
|
|
|
EXTRA_DIST += src/bluetooth.service.in
|
|
|
|
|
2011-08-22 21:00:21 +08:00
|
|
|
plugindir = $(libdir)/bluetooth/plugins
|
|
|
|
|
2011-08-15 05:39:14 +08:00
|
|
|
if MAINTAINER_MODE
|
2011-08-22 21:00:21 +08:00
|
|
|
build_plugindir = $(abs_top_srcdir)/plugins/.libs
|
2011-08-15 05:39:14 +08:00
|
|
|
else
|
2011-08-22 21:00:21 +08:00
|
|
|
build_plugindir = $(plugindir)
|
2011-08-15 05:39:14 +08:00
|
|
|
endif
|
|
|
|
|
2009-08-23 15:40:59 +08:00
|
|
|
|
|
|
|
plugin_LTLIBRARIES =
|
|
|
|
|
|
|
|
|
2010-09-20 15:42:59 +08:00
|
|
|
lib_headers = lib/bluetooth.h lib/hci.h lib/hci_lib.h lib/mgmt.h \
|
2011-03-15 06:10:56 +08:00
|
|
|
lib/sco.h lib/l2cap.h lib/sdp.h lib/sdp_lib.h lib/uuid.h \
|
2012-11-30 18:42:31 +08:00
|
|
|
lib/rfcomm.h lib/bnep.h lib/cmtp.h lib/hidp.h lib/a2mp.h \
|
|
|
|
lib/amp.h
|
2009-08-23 15:40:59 +08:00
|
|
|
local_headers = $(foreach file,$(lib_headers), lib/bluetooth/$(notdir $(file)))
|
|
|
|
|
2011-11-13 07:25:35 +08:00
|
|
|
BUILT_SOURCES = $(local_headers) src/builtin.h
|
2011-07-09 23:10:53 +08:00
|
|
|
|
2009-08-23 15:40:59 +08:00
|
|
|
include_HEADERS += $(lib_headers)
|
|
|
|
|
|
|
|
lib_LTLIBRARIES += lib/libbluetooth.la
|
|
|
|
|
|
|
|
lib_libbluetooth_la_SOURCES = $(lib_headers) \
|
2011-03-16 10:54:49 +08:00
|
|
|
lib/bluetooth.c lib/hci.c lib/sdp.c lib/uuid.c
|
2012-06-14 02:58:23 +08:00
|
|
|
lib_libbluetooth_la_LDFLAGS = $(AM_LDFLAGS) -version-info 16:0:13
|
2009-08-23 15:40:59 +08:00
|
|
|
lib_libbluetooth_la_DEPENDENCIES = $(local_headers)
|
|
|
|
|
2011-08-29 07:07:43 +08:00
|
|
|
noinst_LTLIBRARIES += lib/libbluetooth-private.la
|
|
|
|
|
|
|
|
lib_libbluetooth_private_la_SOURCES = $(lib_libbluetooth_la_SOURCES)
|
|
|
|
|
2012-04-04 00:01:31 +08:00
|
|
|
attrib_sources = attrib/att.h attrib/att-database.h attrib/att.c \
|
|
|
|
attrib/gatt.h attrib/gatt.c \
|
2011-03-29 06:40:46 +08:00
|
|
|
attrib/gattrib.h attrib/gattrib.c attrib/client.h \
|
2011-11-04 22:30:00 +08:00
|
|
|
attrib/client.c attrib/gatt-service.h attrib/gatt-service.c
|
2009-08-23 15:40:59 +08:00
|
|
|
|
2010-09-10 00:31:24 +08:00
|
|
|
gdbus_sources = gdbus/gdbus.h gdbus/mainloop.c gdbus/watch.c \
|
|
|
|
gdbus/object.c gdbus/polkit.c
|
2009-08-23 15:40:59 +08:00
|
|
|
|
2010-09-13 16:17:31 +08:00
|
|
|
btio_sources = btio/btio.h btio/btio.c
|
|
|
|
|
2012-12-01 22:08:06 +08:00
|
|
|
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
|
|
|
|
|
2009-08-23 15:40:59 +08:00
|
|
|
builtin_modules =
|
|
|
|
builtin_sources =
|
|
|
|
builtin_nodist =
|
2010-07-26 18:19:56 +08:00
|
|
|
|
2012-12-09 17:05:17 +08:00
|
|
|
include Makefile.plugins
|
2012-12-09 08:26:22 +08:00
|
|
|
include Makefile.profiles
|
2009-08-23 15:40:59 +08:00
|
|
|
|
2011-02-24 20:13:24 +08:00
|
|
|
if SAPPLUGIN
|
|
|
|
builtin_modules += sap
|
2012-07-10 22:03:06 +08:00
|
|
|
builtin_sources += profiles/sap/main.c profiles/sap/manager.h \
|
|
|
|
profiles/sap/manager.c profiles/sap/server.h \
|
|
|
|
profiles/sap/server.c profiles/sap/sap.h
|
2011-03-16 20:10:20 +08:00
|
|
|
|
2012-07-10 22:03:06 +08:00
|
|
|
builtin_nodist += profiles/sap/sap.c
|
2011-03-16 20:10:20 +08:00
|
|
|
|
2012-07-10 22:03:06 +08:00
|
|
|
noinst_LIBRARIES += profiles/sap/libsap.a
|
2011-03-16 20:10:20 +08:00
|
|
|
|
2012-07-11 02:08:20 +08:00
|
|
|
profiles_sap_libsap_a_SOURCES = profiles/sap/sap.h profiles/sap/sap-dummy.c \
|
2012-07-10 22:03:06 +08:00
|
|
|
profiles/sap/sap-u8500.c
|
2011-02-24 20:13:24 +08:00
|
|
|
endif
|
|
|
|
|
2011-08-11 21:10:15 +08:00
|
|
|
if MAINTAINER_MODE
|
|
|
|
plugin_LTLIBRARIES += plugins/external-dummy.la
|
|
|
|
plugins_external_dummy_la_SOURCES = plugins/external-dummy.c
|
2012-05-09 20:06:17 +08:00
|
|
|
plugins_external_dummy_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version \
|
|
|
|
-no-undefined
|
2011-11-13 12:48:44 +08:00
|
|
|
plugins_external_dummy_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden
|
2011-08-11 21:10:15 +08:00
|
|
|
endif
|
|
|
|
|
2012-12-09 18:19:53 +08:00
|
|
|
libexec_PROGRAMS += src/bluetoothd
|
2009-08-23 15:40:59 +08:00
|
|
|
|
|
|
|
src_bluetoothd_SOURCES = $(gdbus_sources) $(builtin_sources) \
|
2010-09-13 16:17:31 +08:00
|
|
|
$(attrib_sources) $(btio_sources) \
|
2012-12-09 17:00:40 +08:00
|
|
|
src/bluetooth.ver \
|
2010-05-21 20:26:15 +08:00
|
|
|
src/main.c src/log.h src/log.c \
|
2010-10-27 04:06:44 +08:00
|
|
|
src/rfkill.c src/hcid.h src/sdpd.h \
|
2009-08-23 15:40:59 +08:00
|
|
|
src/sdpd-server.c src/sdpd-request.c \
|
|
|
|
src/sdpd-service.c src/sdpd-database.c \
|
2010-07-08 04:44:41 +08:00
|
|
|
src/attrib-server.h src/attrib-server.c \
|
2010-09-13 16:17:31 +08:00
|
|
|
src/sdp-xml.h src/sdp-xml.c \
|
2011-10-18 16:15:23 +08:00
|
|
|
src/sdp-client.h src/sdp-client.c \
|
2012-04-17 00:22:24 +08:00
|
|
|
src/textfile.h src/textfile.c \
|
2009-08-29 13:24:04 +08:00
|
|
|
src/glib-helper.h src/glib-helper.c \
|
2012-12-09 07:42:26 +08:00
|
|
|
src/uinput.h \
|
2009-08-23 15:40:59 +08:00
|
|
|
src/plugin.h src/plugin.c \
|
|
|
|
src/storage.h src/storage.c \
|
|
|
|
src/agent.h src/agent.c \
|
|
|
|
src/error.h src/error.c \
|
|
|
|
src/manager.h src/manager.c \
|
|
|
|
src/adapter.h src/adapter.c \
|
2012-09-10 20:32:22 +08:00
|
|
|
src/profile.h src/profile.c \
|
2011-07-07 05:22:53 +08:00
|
|
|
src/device.h src/device.c src/attio.h \
|
2009-08-23 15:40:59 +08:00
|
|
|
src/dbus-common.c src/dbus-common.h \
|
2012-12-04 19:19:48 +08:00
|
|
|
src/eir.h src/eir.c src/mgmt.c src/mgmt.h
|
2011-08-29 07:07:43 +08:00
|
|
|
src_bluetoothd_LDADD = lib/libbluetooth-private.la @GLIB_LIBS@ @DBUS_LIBS@ \
|
2012-05-29 14:19:30 +08:00
|
|
|
-ldl -lrt
|
2012-05-09 20:06:17 +08:00
|
|
|
src_bluetoothd_LDFLAGS = $(AM_LDFLAGS) -Wl,--export-dynamic \
|
2010-10-06 20:11:53 +08:00
|
|
|
-Wl,--version-script=$(srcdir)/src/bluetooth.ver
|
|
|
|
|
2011-08-29 07:07:43 +08:00
|
|
|
src_bluetoothd_DEPENDENCIES = lib/libbluetooth-private.la
|
2009-08-23 15:40:59 +08:00
|
|
|
|
2011-11-13 12:48:44 +08:00
|
|
|
src_bluetoothd_CFLAGS = $(AM_CFLAGS) -DBLUETOOTH_PLUGIN_BUILTIN \
|
|
|
|
-DPLUGINDIR=\""$(build_plugindir)"\"
|
|
|
|
src_bluetoothd_SHORTNAME = bluetoothd
|
|
|
|
|
2009-08-23 15:40:59 +08:00
|
|
|
builtin_files = src/builtin.h $(builtin_nodist)
|
|
|
|
|
|
|
|
nodist_src_bluetoothd_SOURCES = $(builtin_files)
|
|
|
|
|
2010-09-22 02:46:56 +08:00
|
|
|
CLEANFILES += $(builtin_files)
|
2009-08-23 15:40:59 +08:00
|
|
|
|
|
|
|
man_MANS = src/bluetoothd.8
|
|
|
|
|
2011-07-02 11:35:10 +08:00
|
|
|
if DATAFILES
|
2009-08-23 15:40:59 +08:00
|
|
|
conf_DATA += src/main.conf
|
|
|
|
endif
|
|
|
|
|
2012-06-14 20:52:25 +08:00
|
|
|
EXTRA_DIST += src/genbuiltin src/bluetooth.conf src/org.bluez.service \
|
2012-07-10 22:03:03 +08:00
|
|
|
src/main.conf profiles/network/network.conf \
|
2012-07-11 02:08:23 +08:00
|
|
|
profiles/input/input.conf profiles/proximity/proximity.conf \
|
2012-11-13 01:00:32 +08:00
|
|
|
profiles/audio/audio.conf \
|
2012-11-12 22:38:16 +08:00
|
|
|
profiles/sap/sap-dummy.c profiles/sap/sap-u8500.c
|
2009-08-23 15:40:59 +08:00
|
|
|
|
|
|
|
include Makefile.tools
|
2012-12-05 06:38:48 +08:00
|
|
|
include Makefile.obexd
|
2009-08-23 15:40:59 +08:00
|
|
|
|
2011-07-02 11:35:11 +08:00
|
|
|
if DATAFILES
|
2011-04-29 06:32:25 +08:00
|
|
|
rulesdir = @UDEV_DIR@/rules.d
|
2009-08-23 15:40:59 +08:00
|
|
|
|
2012-05-04 06:21:53 +08:00
|
|
|
udev_files =
|
2009-08-23 15:40:59 +08:00
|
|
|
|
|
|
|
if HID2HCI
|
|
|
|
udev_files += scripts/bluetooth-hid2hci.rules
|
|
|
|
endif
|
|
|
|
|
|
|
|
rules_DATA = $(foreach file,$(udev_files), scripts/97-$(notdir $(file)))
|
|
|
|
endif
|
|
|
|
|
|
|
|
CLEANFILES += $(rules_DATA)
|
|
|
|
|
2012-12-09 07:59:22 +08:00
|
|
|
EXTRA_DIST += scripts/bluetooth-hid2hci.rules
|
2009-08-23 15:40:59 +08:00
|
|
|
|
2012-12-05 20:51:34 +08:00
|
|
|
EXTRA_DIST += doc/adapter-api.txt doc/device-api.txt doc/profile-api.txt \
|
2010-07-06 21:33:08 +08:00
|
|
|
doc/service-api.txt doc/agent-api.txt doc/attribute-api.txt \
|
2012-11-26 23:00:13 +08:00
|
|
|
doc/network-api.txt doc/control-api.txt doc/health-api.txt \
|
|
|
|
doc/sap-api.txt doc/media-api.txt doc/assigned-numbers.txt \
|
2012-10-09 21:51:47 +08:00
|
|
|
doc/supported-features.txt doc/alert-api.txt doc/mgmt-api.txt \
|
|
|
|
doc/oob-api.txt doc/proximity-api.txt doc/heartrate-api.txt \
|
2012-12-04 20:43:44 +08:00
|
|
|
doc/thermometer-api.txt doc/audio-telephony-design.txt \
|
|
|
|
doc/cyclingspeed-api.txt
|
2009-08-23 15:40:59 +08:00
|
|
|
|
2012-05-29 14:19:30 +08:00
|
|
|
AM_CFLAGS += @DBUS_CFLAGS@ @GLIB_CFLAGS@
|
2009-08-23 15:40:59 +08:00
|
|
|
|
2012-12-07 18:46:04 +08:00
|
|
|
AM_CPPFLAGS = -I$(builddir)/lib -I$(builddir)/src -I$(srcdir)/src \
|
|
|
|
-I$(srcdir)/gdbus -I$(srcdir)/btio
|
2009-08-23 15:40:59 +08:00
|
|
|
|
2012-11-13 05:03:41 +08:00
|
|
|
|
2012-12-09 20:15:27 +08:00
|
|
|
unit_tests = unit/test-eir unit/test-uuid unit/test-textfile
|
2011-10-18 19:33:32 +08:00
|
|
|
|
|
|
|
unit_test_eir_SOURCES = unit/test-eir.c src/eir.c src/glib-helper.c
|
2012-12-09 17:33:32 +08:00
|
|
|
unit_test_eir_LDADD = lib/libbluetooth-private.la @GLIB_LIBS@
|
2011-10-18 19:33:32 +08:00
|
|
|
|
2012-12-09 19:46:11 +08:00
|
|
|
unit_test_uuid_SOURCES = unit/test-uuid.c
|
|
|
|
unit_test_uuid_LDADD = lib/libbluetooth-private.la @GLIB_LIBS@
|
|
|
|
|
2012-12-09 20:15:27 +08:00
|
|
|
unit_test_textfile_SOURCES = unit/test-textfile.c src/textfile.h src/textfile.c
|
|
|
|
unit_test_textfile_LDADD = @GLIB_LIBS@
|
|
|
|
|
2012-12-01 22:08:06 +08:00
|
|
|
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_packet_SOURCES = $(gobex_sources) unit/util.c unit/util.h \
|
|
|
|
unit/test-gobex-packet.c
|
|
|
|
unit_test_gobex_packet_LDADD = @GLIB_LIBS@
|
|
|
|
|
|
|
|
unit_test_gobex_header_SOURCES = $(gobex_sources) unit/util.c unit/util.h \
|
|
|
|
unit/test-gobex-header.c
|
|
|
|
unit_test_gobex_header_LDADD = @GLIB_LIBS@
|
|
|
|
|
|
|
|
unit_test_gobex_transfer_SOURCES = $(gobex_sources) unit/util.c unit/util.h \
|
|
|
|
unit/test-gobex-transfer.c
|
|
|
|
unit_test_gobex_transfer_LDADD = @GLIB_LIBS@
|
|
|
|
|
|
|
|
unit_test_gobex_apparam_SOURCES = $(gobex_sources) unit/util.c unit/util.h \
|
|
|
|
unit/test-gobex-apparam.c
|
|
|
|
unit_test_gobex_apparam_LDADD = @GLIB_LIBS@
|
|
|
|
|
|
|
|
noinst_PROGRAMS += $(unit_tests)
|
|
|
|
|
2011-10-18 19:33:32 +08:00
|
|
|
TESTS = $(unit_tests)
|
|
|
|
|
2004-07-28 15:09:49 +08:00
|
|
|
pkgconfigdir = $(libdir)/pkgconfig
|
|
|
|
|
|
|
|
pkgconfig_DATA = bluez.pc
|
|
|
|
|
2011-07-02 11:35:11 +08:00
|
|
|
DISTCHECK_CONFIGURE_FLAGS = --disable-datafiles
|
2009-07-07 01:29:57 +08:00
|
|
|
|
2007-12-09 05:46:12 +08:00
|
|
|
DISTCLEANFILES = $(pkgconfig_DATA)
|
2004-07-21 21:30:34 +08:00
|
|
|
|
|
|
|
MAINTAINERCLEANFILES = Makefile.in \
|
|
|
|
aclocal.m4 configure config.h.in config.sub config.guess \
|
2012-08-10 04:29:02 +08:00
|
|
|
ltmain.sh depcomp compile missing install-sh mkinstalldirs
|
2009-08-23 15:40:59 +08:00
|
|
|
|
2012-12-09 18:19:53 +08:00
|
|
|
SED_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
|
|
|
|
$(SED) -e 's,@libexecdir\@,$(libexecdir),g' \
|
|
|
|
< $< > $@
|
|
|
|
|
|
|
|
%.service: %.service.in Makefile
|
|
|
|
$(SED_PROCESS)
|
|
|
|
|
2009-08-23 15:40:59 +08:00
|
|
|
src/builtin.h: src/genbuiltin $(builtin_sources)
|
|
|
|
$(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
|
|
|
|
|
2012-07-10 22:03:06 +08:00
|
|
|
profiles/sap/sap.c: profiles/sap/@SAP_DRIVER@
|
2012-12-05 19:22:51 +08:00
|
|
|
$(AM_V_GEN)$(LN_S) -f $(abs_top_srcdir)/$< $@
|
2011-03-16 20:10:20 +08:00
|
|
|
|
2009-08-23 15:40:59 +08:00
|
|
|
scripts/%.rules:
|
|
|
|
$(AM_V_GEN)cp $(subst 97-,,$@) $@
|
|
|
|
|
2009-08-25 01:57:50 +08:00
|
|
|
$(lib_libbluetooth_la_OBJECTS): $(local_headers)
|
|
|
|
|
2009-08-23 15:40:59 +08:00
|
|
|
lib/bluetooth/%.h: lib/%.h
|
2009-08-25 03:51:50 +08:00
|
|
|
$(AM_V_at)$(MKDIR_P) lib/bluetooth
|
2012-12-05 19:22:51 +08:00
|
|
|
$(AM_V_GEN)$(LN_S) -f $(abs_top_builddir)/$< $@
|
2009-08-23 15:40:59 +08:00
|
|
|
|
2010-09-03 19:20:08 +08:00
|
|
|
clean-local:
|
|
|
|
$(RM) -r lib/bluetooth
|