X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fstack%2Fsamples%2Farduino%2FSimpleClientServer%2Focserver%2FSConscript;h=6f03453f58d343cb2df6acacc67a8b12829d997d;hb=935fdb9b67b6c10d007e652e9e2e028fd6ccfe09;hp=f5a4222a5fec203b9d3d05cac0c420b0a2ac8b7a;hpb=00b3660e45c56cb3db35dc2596a054f801b5591a;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/stack/samples/arduino/SimpleClientServer/ocserver/SConscript b/resource/csdk/stack/samples/arduino/SimpleClientServer/ocserver/SConscript index f5a4222..6f03453 100644 --- a/resource/csdk/stack/samples/arduino/SimpleClientServer/ocserver/SConscript +++ b/resource/csdk/stack/samples/arduino/SimpleClientServer/ocserver/SConscript @@ -1,3 +1,23 @@ +#****************************************************************** +# +# Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved. +# +#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + Import('env') arduino_simplecs_env = env.Clone() @@ -5,14 +25,15 @@ arduino_simplecs_env = env.Clone() # Build flags ###################################################################### arduino_simplecs_env.PrependUnique(CPPPATH = [ - '../../../../../ocsocket/include', '../../../../../logger/include', '../../../../../stack/include', '../../../../../../oc_logger/include' ]) arduino_simplecs_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')]) -arduino_simplecs_env.PrependUnique(LIBS = ['octbstack', 'coap']) +arduino_simplecs_env.AppendUnique(CPPDEFINES = ['TB_LOG']) + +arduino_simplecs_env.PrependUnique(LIBS = ['octbstack', 'connectivity_abstraction','coap']) arduino_simplecs = arduino_simplecs_env.Program('SimpleClientServer', 'ocserver.cpp') env.CreateBin('SimpleClientServer') @@ -20,4 +41,11 @@ env.CreateBin('SimpleClientServer') i_arduino_simplecs = arduino_simplecs_env.Install(env.get('BUILD_DIR'), arduino_simplecs) Alias('arduino_simplecs', i_arduino_simplecs) -env.AppendTarget('arduino_simplecs') \ No newline at end of file +env.AppendTarget('arduino_simplecs') + +if(arduino_simplecs_env['UPLOAD'] == True): + from sys import platform as _platform + if _platform == "linux" or _platform == "linux2": + arduino_simplecs_env.Upload(env.get('BUILD_DIR') + '/resource/csdk/stack/samples/arduino/SimpleClientServer/ocserver/SimpleClientServer.hex') + else: + print 'Please use appropriate install method for your developing machine. Linux is the only supported platform right now.'