[IMPROVE] add WSP_SUPPORT build flag 74/44174/2
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Fri, 17 Jul 2015 10:39:55 +0000 (13:39 +0300)
committerDmitry Kovalenko <d.kovalenko@samsung.com>
Fri, 17 Jul 2015 10:51:56 +0000 (03:51 -0700)
Change-Id: I817d1a23530ab5deaf13bc567d3470a2d2f5e69a
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
daemon/Makefile
packaging/swap-manager.spec

index d17f918..7ddf574 100644 (file)
@@ -84,7 +84,6 @@ SRC_CPP := \
        cpp/features/feature.cpp \
        cpp/features/feature_manager.cpp \
        cpp/features/feature_manager_c.cpp \
-       cpp/features/feature_wsp.cpp \
        cpp/features/feature_nsp.cpp \
 \
        cpp/inst/AppInst.cpp \
@@ -93,10 +92,6 @@ SRC_CPP := \
        cpp/elf/File.cpp \
        cpp/elf/FileElf.cpp
 
-OBJS_C := $(SRC_C:.c=.o)
-OBJS_CPP := $(SRC_CPP:.cpp=.o)
-OBJS := $(OBJS_C) $(OBJS_CPP)
-
 TARGET = da_manager
 DASCRIPT = da_command
 START_SH = ../scripts/start.sh
@@ -108,18 +103,25 @@ all: debug
 
 GENERATED_DIR = include/generated
 GENERATED_WSI_PROF_H = include/generated/wsi_prof.h
-GENERATED_WSP_H = include/generated/wsp_data.h
 GENERATED_NSP_H = include/generated/nsp_data.h
 GENERATED_HEADERS := \
        $(GENERATED_WSI_PROF_H) \
-       $(GENERATED_WSP_H) \
        $(GENERATED_NSP_H)
 
 $(GENERATED_WSI_PROF_H): ../scripts/gen_wsi_prof.sh
        sh $< > $@
 
-$(GENERATED_WSP_H): ../scripts/gen_wsp_data.sh
+
+# WSP
+ifeq ($(WSP_SUPPORT),y)
+  SRC_CPP += cpp/features/feature_wsp.cpp
+  GENERATED_WSP_H = include/generated/wsp_data.h
+  GENERATED_HEADERS += $(GENERATED_WSP_H)
+
+  $(GENERATED_WSP_H): ../scripts/gen_wsp_data.sh
        sh $< > $@
+endif # WSP_SUPPORT
+
 
 $(GENERATED_NSP_H): ../scripts/gen_nsp_data.sh
        sh $< > $@
@@ -136,6 +138,10 @@ release: CFLAGS += -DNOLOGI=1
 release: CPPFLAGS += -DNOLOGI=1
 release: debug
 
+OBJS_C := $(SRC_C:.c=.o)
+OBJS_CPP := $(SRC_CPP:.cpp=.o)
+OBJS := $(OBJS_C) $(OBJS_CPP)
+
 .c.o:
        $(CC) $(CFLAGS) -c -o $@ $<
 
index d45800d..b3f53f9 100644 (file)
@@ -44,7 +44,7 @@ pushd scripts
 echo "__tizen_profile_name__="%{?tizen_profile_name} > dyn_vars
 popd
 cd daemon
-make
+WSP_SUPPORT=y make
 
 %install
 rm -rf ${RPM_BUILD_ROOT}