From 31120f32397dd02498ec2eaa91227489d162b70b Mon Sep 17 00:00:00 2001 From: Dmitry Kovalenko Date: Tue, 21 Jul 2015 12:07:11 +0300 Subject: [PATCH] [FIX] Build for TV and Wearable Change-Id: I45c14cb0ea6c783abbccf871584d9a4a7eb62526 Signed-off-by: Dmitry Kovalenko --- daemon/Makefile | 20 ++++++++++++++++---- daemon/device_vconf.c | 6 ++++++ packaging/swap-manager.spec | 15 +++++++++++---- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/daemon/Makefile b/daemon/Makefile index 833e61e..61c03a7 100644 --- a/daemon/Makefile +++ b/daemon/Makefile @@ -26,14 +26,22 @@ INCLUDE := \ -I/usr/include/eina-1/eina \ -I/usr/include/efl-1 \ -I/usr/include/json-c \ - -I/usr/include/eo-1 \ - -I/usr/include/callmgr_client + -I/usr/include/eo-1 +# CALL_MNGR +ifeq ($(CALL_MNGR),y) +INCLUDE += -I/usr/include/callmgr_client +endif # CALL_MNGR FLAGS := \ $(COMM_FLAGS) \ $(INCLUDE) \ $(DEBUG_FLAGS) +# CALL_MNGR +ifeq ($(CALL_MNGR),y) +FLAGS += -DCALL_MNGR +endif # CALL_MNGR + ifeq (arm, $(findstring arm, $(shell uname -sm))) FLAGS += -DDEVICE_ONLY endif @@ -51,8 +59,12 @@ LDFLAGS := \ -lecore \ -lcapi-system-info \ -lwebsockets \ - -ljson-c \ - -lcallmgr_client + -ljson-c + +# CALL_MNGR +ifeq ($(CALL_MNGR),y) +LDFLAGS += -lcallmgr_client +endif # CALL_MNGR SRC_C := \ buffer.c \ diff --git a/daemon/device_vconf.c b/daemon/device_vconf.c index 08e41ce..ff4a9d6 100644 --- a/daemon/device_vconf.c +++ b/daemon/device_vconf.c @@ -30,7 +30,9 @@ #include +#ifdef CALL_MNGR #include +#endif #include "swap_debug.h" #include "device_vconf.h" @@ -114,6 +116,7 @@ int get_rssi_status(void) int get_call_status(void) { +#ifdef CALL_MNGR cm_client_h cm_handle = NULL; cm_call_status_e call_status = CM_CALL_STATUS_MAX; int res = 0; @@ -132,6 +135,9 @@ int get_call_status(void) } return call_status; +#else + return 0; +#endif } int get_dnet_status(void) diff --git a/packaging/swap-manager.spec b/packaging/swap-manager.spec index 1be6f96..be0bade 100644 --- a/packaging/swap-manager.spec +++ b/packaging/swap-manager.spec @@ -15,7 +15,9 @@ BuildRequires: capi-system-runtime-info-devel BuildRequires: libwebsockets-devel BuildRequires: pkgconfig(json-c) BuildRequires: pkgconfig(ecore) +%if "%{?tizen_profile_name}" == "mobile" BuildRequires: pkgconfig(callmgr_client) +%endif BuildRequires: swap-probe-devel %if "%{?tizen_profile_name}" == "tv" BuildRequires: webkit2-efl-tv @@ -46,12 +48,17 @@ echo "__tizen_profile_name__="%{?tizen_profile_name} > dyn_vars popd cd daemon -%if "%{?tizen_profile_name}" == "tv" - make -%else - WSP_SUPPORT=y make +SWAP_BUILD_CONF="" +%if "%{?tizen_profile_name}" == "mobile" +SWAP_BUILD_CONF=$SWAP_BUILD_CONF CALL_MNGR=y %endif +%if "%{?tizen_profile_name}" != "tv" +SWAP_BUILD_CONF=$SWAP_BUILD_CONF WSP_SUPPORT=y +%endif + +$SWAP_BUILD_CONF make + %install rm -rf ${RPM_BUILD_ROOT} mkdir -p %{buildroot}/usr/share/license -- 2.7.4