Fix for PPM tizen sample build issue.
authorHarish Kumara Marappa <h.marappa@samsung.com>
Thu, 23 Apr 2015 11:00:47 +0000 (16:30 +0530)
committerUze Choi <uzchoi@samsung.com>
Fri, 24 Apr 2015 01:07:13 +0000 (01:07 +0000)
PPM service files were building without TIZEN related macros as the
definitions were added only for CFLAGS. Modified the code for adding the
definitions to CCFLAGS so it will be added for compiling .c and .cpp
files.

Fixed the compilation errors getting in tizen ppmsample application.

Change-Id: I2c8cf5380c0362b7a91c60e3758bbb3ecd737f6d
Signed-off-by: Harish Kumara Marappa <h.marappa@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/816
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
build_common/linux/SConscript
service/protocol-plugin/sample-app/tizen/PPMSampleApp/src/ppmsampleapp.cpp

index 5c810a2..4f0722a 100644 (file)
@@ -24,7 +24,7 @@ env.AppendUnique(LINKFLAGS = ['-ldl', '-lpthread'])
 env.ParseConfig("pkg-config glib-2.0 gthread-2.0 --cflags --libs")
 
 if env.get('TARGET_OS') == 'tizen':
-    env.AppendUnique(CFLAGS = ['-D__TIZEN__', '-DSLP_SDK_LOG', '-D_GNU_SOURCE', '-DTIZEN_DEBUG_ENABLE'])
+    env.AppendUnique(CCFLAGS = ['-D__TIZEN__', '-DSLP_SDK_LOG', '-D_GNU_SOURCE', '-DTIZEN_DEBUG_ENABLE'])
     env.ParseConfig("pkg-config dlog --cflags --libs")
 
 # Set arch flags
index b92feaa..5d1e633 100644 (file)
@@ -112,7 +112,7 @@ void onObserve(const HeaderOptions headerOptions, const OCRepresentation &rep,
     if (eCode == OC_STACK_OK)
     {
         std::cout << "OBSERVE RESULT:" << std::endl;
-        std::cout << "\tSequenceNumber: " << sequenceNumber << endl;
+        std::cout << "\tSequenceNumber: " << sequenceNumber << std::endl;
 
         rep.getValue("state", myfan.m_state);
         rep.getValue("power", myfan.m_power);
@@ -187,9 +187,9 @@ void onPost2(const HeaderOptions &headerOptions, const OCRepresentation &rep, co
         }
 
         if (OBSERVE_TYPE_TO_USE == ObserveType::Observe)
-            std::cout << endl << "Observe is used." << endl << endl;
+            std::cout << std::endl << "Observe is used." << std::endl;
         else if (OBSERVE_TYPE_TO_USE == ObserveType::ObserveAll)
-            std::cout << endl << "ObserveAll is used." << endl << endl;
+            std::cout << std::endl << "ObserveAll is used." << std::endl;
 
         // curFanResource->observe(OBSERVE_TYPE_TO_USE, QueryParamsMap(), &onObserve);
 
@@ -541,7 +541,7 @@ send_msg_clicked_cb(void *data , Evas_Object *obj , void *event_info)
             std::cout << "Before find Resource... " << std::endl;
 
             // Find fan resources
-            OCPlatform::findResource("", "coap://224.0.1.187/oc/core?rt=core.fan",
+            OCPlatform::findResource("", "coap://224.0.1.187/oc/core?rt=core.fan", OC_WIFI,
                                      &foundResourceFan);
             std::cout << "Finding Resource... " << std::endl;
         }