[FIX] Build for TV and Wearable 82/44382/2
authorDmitry Kovalenko <d.kovalenko@samsung.com>
Tue, 21 Jul 2015 09:07:11 +0000 (12:07 +0300)
committerDmitry Kovalenko <d.kovalenko@samsung.com>
Tue, 21 Jul 2015 09:17:20 +0000 (12:17 +0300)
Change-Id: I45c14cb0ea6c783abbccf871584d9a4a7eb62526
Signed-off-by: Dmitry Kovalenko <d.kovalenko@samsung.com>
daemon/Makefile
daemon/device_vconf.c
packaging/swap-manager.spec

index 833e61e..61c03a7 100644 (file)
@@ -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 \
index 08e41ce..ff4a9d6 100644 (file)
@@ -30,7 +30,9 @@
 
 
 #include <vconf.h>
+#ifdef CALL_MNGR
 #include <call-manager.h>
+#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)
index 1be6f96..be0bade 100644 (file)
@@ -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