From: Harish Kumara Marappa Date: Thu, 23 Apr 2015 11:00:47 +0000 (+0530) Subject: Fix for PPM tizen sample build issue. X-Git-Tag: 0.9.1~110 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5013eb93a1a47083947191d5d891bfe5f2ac9ac;p=contrib%2Fiotivity.git Fix for PPM tizen sample build issue. 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 Reviewed-on: https://gerrit.iotivity.org/gerrit/816 Tested-by: jenkins-iotivity Reviewed-by: Habib Virji Reviewed-by: Uze Choi --- diff --git a/build_common/linux/SConscript b/build_common/linux/SConscript index 5c810a2..4f0722a 100644 --- a/build_common/linux/SConscript +++ b/build_common/linux/SConscript @@ -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 diff --git a/service/protocol-plugin/sample-app/tizen/PPMSampleApp/src/ppmsampleapp.cpp b/service/protocol-plugin/sample-app/tizen/PPMSampleApp/src/ppmsampleapp.cpp index b92feaa..5d1e633 100644 --- a/service/protocol-plugin/sample-app/tizen/PPMSampleApp/src/ppmsampleapp.cpp +++ b/service/protocol-plugin/sample-app/tizen/PPMSampleApp/src/ppmsampleapp.cpp @@ -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; }