1 #******************************************************************
3 # Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
5 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 Import('stacksamples_env')
23 arduino_simplecs_env = stacksamples_env.Clone()
24 transport = arduino_simplecs_env.get('TARGET_TRANSPORT')
26 ######################################################################
28 ######################################################################
29 arduino_simplecs_env.PrependUnique(CPPPATH = [
30 '../../../../../logger/include',
31 '../../../../../include',
32 '../../../../../stack/include',
33 '../../../../../../oc_logger/include'
36 arduino_simplecs_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
38 arduino_simplecs_env.PrependUnique(LIBS = ['octbstack', 'ocsrm', 'connectivity_abstraction','coap'])
40 arduino_simplecs = arduino_simplecs_env.Program('SimpleClientServer', 'ocserver.cpp')
41 arduino_simplecs_env.CreateBin('SimpleClientServer')
43 i_arduino_simplecs = arduino_simplecs_env.Install(arduino_simplecs_env.get('BUILD_DIR'), arduino_simplecs)
45 #The map file is intermediate file, make sure it's removed when clean build
46 arduino_simplecs_env.Clean(arduino_simplecs, 'SimpleClientServer.map')
48 Alias('arduino_simplecs', i_arduino_simplecs)
49 arduino_simplecs_env.AppendTarget('arduino_simplecs')
51 if(arduino_simplecs_env['UPLOAD'] == True):
52 from sys import platform as _platform
53 if _platform == "linux" or _platform == "linux2":
54 arduino_simplecs_env.Upload(arduino_simplecs_env.get('BUILD_DIR') + '/resource/csdk/stack/samples/arduino/SimpleClientServer/ocserver/SimpleClientServer.hex')
56 print 'Please use appropriate install method for your developing machine. Linux is the only supported platform right now.'