From bc974ed90518c59d60d205efb06eff320eebd9e6 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 9 Dec 2012 01:26:22 +0100 Subject: [PATCH] build: Use a separate Makefile.profiles --- .gitignore | 1 - Makefile.am | 114 +--------------------------------------------- Makefile.profiles | 113 +++++++++++++++++++++++++++++++++++++++++++++ acinclude.m4 | 9 ---- 4 files changed, 114 insertions(+), 123 deletions(-) create mode 100644 Makefile.profiles diff --git a/.gitignore b/.gitignore index 9e5db29e2..61aa8cb9e 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,6 @@ src/bluetoothd audio/telephony.c scripts/97-bluetooth-hid2hci.rules -profiles/input/suspend.c profiles/sap/sap.c profiles/cups/bluetooth diff --git a/Makefile.am b/Makefile.am index 4a733ec39..c9169049c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -107,29 +107,7 @@ builtin_sources = builtin_nodist = mcap_sources = -if MCAP -mcap_sources += profiles/health/mcap_lib.h profiles/health/mcap_internal.h \ - profiles/health/mcap.h profiles/health/mcap.c \ - profiles/health/mcap_sync.c -endif - -if AUDIOPLUGIN -builtin_modules += audio -builtin_sources += profiles/audio/main.c \ - profiles/audio/manager.h profiles/audio/manager.c \ - profiles/audio/control.h profiles/audio/control.c \ - profiles/audio/avctp.h profiles/audio/avctp.c \ - profiles/audio/avrcp.h profiles/audio/avrcp.c \ - profiles/audio/device.h profiles/audio/device.c \ - profiles/audio/source.h profiles/audio/source.c \ - profiles/audio/sink.h profiles/audio/sink.c \ - profiles/audio/a2dp.h profiles/audio/a2dp.c \ - profiles/audio/avdtp.h profiles/audio/avdtp.c \ - profiles/audio/media.h profiles/audio/media.c \ - profiles/audio/transport.h profiles/audio/transport.c \ - profiles/audio/player.h profiles/audio/player.c \ - profiles/audio/a2dp-codecs.h -endif +include Makefile.profiles if SAPPLUGIN builtin_modules += sap @@ -145,91 +123,11 @@ profiles_sap_libsap_a_SOURCES = profiles/sap/sap.h profiles/sap/sap-dummy.c \ profiles/sap/sap-u8500.c endif -if INPUTPLUGIN -builtin_modules += input -builtin_sources += profiles/input/main.c \ - profiles/input/manager.h profiles/input/manager.c \ - profiles/input/server.h profiles/input/server.c \ - profiles/input/device.h profiles/input/device.c -endif - -if HOGPLUGIN -builtin_modules += hog -builtin_sources += profiles/input/hog_manager.c profiles/input/hog_device.h \ - profiles/input/hog_device.c profiles/input/uhid_copy.h \ - profiles/input/suspend.h -builtin_nodist += profiles/input/suspend.c -endif - -EXTRA_DIST += profiles/input/suspend-dummy.c - -if NETWORKPLUGIN -builtin_modules += network -builtin_sources += profiles/network/main.c \ - profiles/network/manager.h profiles/network/manager.c \ - profiles/network/common.h profiles/network/common.c \ - profiles/network/server.h profiles/network/server.c \ - profiles/network/connection.h \ - profiles/network/connection.c -endif - if SERVICEPLUGIN builtin_modules += service builtin_sources += plugins/service.c endif -if HEALTHPLUGIN -builtin_modules += health -builtin_sources += profiles/health/hdp_main.c profiles/health/hdp_types.h \ - profiles/health/hdp_manager.h profiles/health/hdp_manager.c \ - profiles/health/hdp.h profiles/health/hdp.c \ - profiles/health/hdp_util.h profiles/health/hdp_util.c -endif - -builtin_modules += thermometer alert time gatt_example proximity deviceinfo \ - gatt scanparam heartrate cyclingspeed -builtin_sources += profiles/thermometer/main.c \ - profiles/thermometer/manager.h \ - profiles/thermometer/manager.c \ - profiles/thermometer/thermometer.h \ - profiles/thermometer/thermometer.c \ - profiles/alert/main.c profiles/alert/server.h \ - profiles/alert/server.c profiles/alert/manager.h \ - profiles/alert/manager.c \ - profiles/time/main.c profiles/time/server.h \ - profiles/time/server.c profiles/time/manager.c \ - profiles/time/manager.h \ - plugins/gatt-example.c \ - profiles/proximity/main.c profiles/proximity/manager.h \ - profiles/proximity/manager.c \ - profiles/proximity/monitor.h \ - profiles/proximity/monitor.c \ - profiles/proximity/reporter.h \ - profiles/proximity/reporter.c \ - profiles/proximity/linkloss.h \ - profiles/proximity/linkloss.c \ - profiles/proximity/immalert.h \ - profiles/proximity/immalert.c \ - profiles/deviceinfo/main.c \ - profiles/deviceinfo/manager.h \ - profiles/deviceinfo/manager.c \ - profiles/deviceinfo/deviceinfo.h \ - profiles/deviceinfo/deviceinfo.c \ - profiles/gatt/main.c profiles/gatt/manager.h \ - profiles/gatt/manager.c profiles/gatt/gas.h \ - profiles/gatt/gas.c \ - profiles/scanparam/main.c \ - profiles/scanparam/manager.h \ - profiles/scanparam/manager.c \ - profiles/scanparam/scan.h profiles/scanparam/scan.c \ - profiles/heartrate/main.c \ - profiles/heartrate/manager.c \ - profiles/heartrate/manager.h \ - profiles/heartrate/heartrate.c \ - profiles/heartrate/heartrate.h \ - profiles/cyclingspeed/cyclingspeed.c - - builtin_modules += formfactor builtin_sources += plugins/formfactor.c @@ -351,13 +249,6 @@ AM_CFLAGS += @DBUS_CFLAGS@ @GLIB_CFLAGS@ AM_CPPFLAGS = -I$(builddir)/lib -I$(builddir)/src -I$(srcdir)/src \ -I$(srcdir)/gdbus -I$(srcdir)/btio -if MCAP -AM_CPPFLAGS += -I$(builddir)/health -endif - -if HOGPLUGIN -AM_CPPFLAGS += -I$(srcdir)/profiles/input -endif unit_objects = @@ -419,9 +310,6 @@ src/builtin.h: src/genbuiltin $(builtin_sources) profiles/sap/sap.c: profiles/sap/@SAP_DRIVER@ $(AM_V_GEN)$(LN_S) -f $(abs_top_srcdir)/$< $@ -profiles/input/suspend.c: profiles/input/@HOG_SUSPEND_DRIVER@ - $(AM_V_GEN)$(LN_S) -f $(abs_top_builddir)/$< $@ - scripts/%.rules: $(AM_V_GEN)cp $(subst 97-,,$@) $@ diff --git a/Makefile.profiles b/Makefile.profiles new file mode 100644 index 000000000..601d9628d --- /dev/null +++ b/Makefile.profiles @@ -0,0 +1,113 @@ + +if AUDIOPLUGIN +builtin_modules += audio +builtin_sources += profiles/audio/main.c \ + profiles/audio/manager.h profiles/audio/manager.c \ + profiles/audio/control.h profiles/audio/control.c \ + profiles/audio/avctp.h profiles/audio/avctp.c \ + profiles/audio/avrcp.h profiles/audio/avrcp.c \ + profiles/audio/device.h profiles/audio/device.c \ + profiles/audio/source.h profiles/audio/source.c \ + profiles/audio/sink.h profiles/audio/sink.c \ + profiles/audio/a2dp.h profiles/audio/a2dp.c \ + profiles/audio/avdtp.h profiles/audio/avdtp.c \ + profiles/audio/media.h profiles/audio/media.c \ + profiles/audio/transport.h profiles/audio/transport.c \ + profiles/audio/player.h profiles/audio/player.c \ + profiles/audio/a2dp-codecs.h +endif + +if NETWORKPLUGIN +builtin_modules += network +builtin_sources += profiles/network/main.c \ + profiles/network/manager.h profiles/network/manager.c \ + profiles/network/common.h profiles/network/common.c \ + profiles/network/server.h profiles/network/server.c \ + profiles/network/connection.h \ + profiles/network/connection.c +endif + +if INPUTPLUGIN +builtin_modules += input +builtin_sources += profiles/input/main.c \ + profiles/input/manager.h profiles/input/manager.c \ + profiles/input/server.h profiles/input/server.c \ + profiles/input/device.h profiles/input/device.c + +builtin_modules += hog +builtin_sources += profiles/input/hog_manager.c profiles/input/hog_device.h \ + profiles/input/hog_device.c profiles/input/uhid_copy.h \ + profiles/input/suspend.h profiles/input/suspend-dummy.c +endif + +if HEALTHPLUGIN +builtin_modules += health +builtin_sources += profiles/health/mcap_lib.h profiles/health/mcap_internal.h \ + profiles/health/mcap.h profiles/health/mcap.c \ + profiles/health/mcap_sync.c \ + profiles/health/hdp_main.c profiles/health/hdp_types.h \ + profiles/health/hdp_manager.h \ + profiles/health/hdp_manager.c \ + profiles/health/hdp.h profiles/health/hdp.c \ + profiles/health/hdp_util.h profiles/health/hdp_util.c +endif + +builtin_modules += thermometer +builtin_sources += profiles/thermometer/main.c \ + profiles/thermometer/manager.h \ + profiles/thermometer/manager.c \ + profiles/thermometer/thermometer.h \ + profiles/thermometer/thermometer.c + +builtin_modules += alert +builtin_sources += profiles/alert/main.c profiles/alert/server.h \ + profiles/alert/server.c profiles/alert/manager.h \ + profiles/alert/manager.c + +builtin_modules += time +builtin_sources += profiles/time/main.c profiles/time/server.h \ + profiles/time/server.c profiles/time/manager.c \ + profiles/time/manager.h + +builtin_modules += gatt_example +builtin_sources += plugins/gatt-example.c + +builtin_modules += proximity +builtin_sources += profiles/proximity/main.c profiles/proximity/manager.h \ + profiles/proximity/manager.c \ + profiles/proximity/monitor.h \ + profiles/proximity/monitor.c \ + profiles/proximity/reporter.h \ + profiles/proximity/reporter.c \ + profiles/proximity/linkloss.h \ + profiles/proximity/linkloss.c \ + profiles/proximity/immalert.h \ + profiles/proximity/immalert.c + +builtin_modules += deviceinfo +builtin_sources += profiles/deviceinfo/main.c \ + profiles/deviceinfo/manager.h \ + profiles/deviceinfo/manager.c \ + profiles/deviceinfo/deviceinfo.h \ + profiles/deviceinfo/deviceinfo.c + +builtin_modules += gatt +builtin_sources += profiles/gatt/main.c profiles/gatt/manager.h \ + profiles/gatt/manager.c profiles/gatt/gas.h \ + profiles/gatt/gas.c + +builtin_modules += scanparam +builtin_sources += profiles/scanparam/main.c \ + profiles/scanparam/manager.h \ + profiles/scanparam/manager.c \ + profiles/scanparam/scan.h profiles/scanparam/scan.c + +builtin_modules += heartrate +builtin_sources += profiles/heartrate/main.c \ + profiles/heartrate/manager.c \ + profiles/heartrate/manager.h \ + profiles/heartrate/heartrate.c \ + profiles/heartrate/heartrate.h + +builtin_modules += cyclingspeed +builtin_sources += profiles/cyclingspeed/cyclingspeed.c diff --git a/acinclude.m4 b/acinclude.m4 index 4893e593c..126dbb4cf 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -164,7 +164,6 @@ AC_DEFUN([AC_ARG_BLUEZ], [ datafiles_enable=yes telephony_driver=dummy sap_driver=dummy - hog_suspend_driver=dummy dbusoob_enable=no wiimote_enable=no neard_enable=no @@ -256,12 +255,6 @@ AC_DEFUN([AC_ARG_BLUEZ], [ wiimote_enable=${enableval} ]) - AC_ARG_WITH(hog_suspend, AC_HELP_STRING([--with-hog-suspend=DRIVER], [select HoG suspend driver]), [ - hog_suspend_driver=${withval} - ]) - - AC_SUBST([HOG_SUSPEND_DRIVER], [suspend-${hog_suspend_driver}.c]) - AC_ARG_ENABLE(neard, AC_HELP_STRING([--enable-neard], [compile with neard plugin]), [ neard_enable=${enableval} ]) @@ -301,7 +294,6 @@ AC_DEFUN([AC_ARG_BLUEZ], [ AM_CONDITIONAL(SAPPLUGIN, test "${sap_enable}" = "yes") AM_CONDITIONAL(SERVICEPLUGIN, test "${service_enable}" = "yes") AM_CONDITIONAL(HEALTHPLUGIN, test "${health_enable}" = "yes") - AM_CONDITIONAL(MCAP, test "${health_enable}" = "yes") AM_CONDITIONAL(READLINE, test "${readline_found}" = "yes") AM_CONDITIONAL(CUPS, test "${cups_enable}" = "yes") AM_CONDITIONAL(TEST, test "${test_enable}" = "yes" && test "${check_found}" = "yes") @@ -311,6 +303,5 @@ AC_DEFUN([AC_ARG_BLUEZ], [ AM_CONDITIONAL(DATAFILES, test "${datafiles_enable}" = "yes") AM_CONDITIONAL(DBUSOOBPLUGIN, test "${dbusoob_enable}" = "yes") AM_CONDITIONAL(WIIMOTEPLUGIN, test "${wiimote_enable}" = "yes") - AM_CONDITIONAL(HOGPLUGIN, test "${input_enable}" = "yes") AM_CONDITIONAL(NEARDPLUGIN, test "${neard_enable}" = "yes") ]) -- 2.47.3