1 #******************************************************************
3 # Copyright 2015 Samsung Electronics 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 ######################################################################
22 # Build script for Arduino Enrollee Sample App
23 ######################################################################
27 enrollee_env = env.Clone()
28 transport = enrollee_env.get('TARGET_TRANSPORT')
30 ######################################################################
32 ######################################################################
33 enrollee_env.PrependUnique(CPPPATH = [
34 env.get('SRC_DIR') + '/resource/oc_logger/include',
35 env.get('SRC_DIR') + '/resource/csdk/logger/include',
36 env.get('SRC_DIR') + '/resource/csdk/stack/include',
37 env.get('SRC_DIR') + '/extlibs/cjson',
38 env.get('SRC_DIR') + '/service/easy-setup/inc',
39 env.get('SRC_DIR') + '/service/easy-setup/enrollee/arduino/wifi',
40 env.get('SRC_DIR') + '/service/easy-setup/enrollee/inc',
41 env.get('SRC_DIR') + '/service/easy-setup/enrollee/src'])
43 enrollee_env.AppendUnique(CPPDEFINES = ['TB_LOG', 'ESWIFI'])
45 enrollee_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
47 enrollee_env.PrependUnique(LIBS = ['octbstack','ocsrm','connectivity_abstraction','coap', 'ESEnrolleeSDK'])
48 enrollee = enrollee_env.Program('enrollee', 'enrolleewifi.cpp')
49 env.CreateBin('enrollee')
51 i_enrollee = enrollee_env.Install(env.get('BUILD_DIR'), enrollee)
53 Alias('enrollee', i_enrollee)
54 env.AppendTarget('enrollee')
56 if(enrollee_env['UPLOAD'] == True):
57 from sys import platform as _platform
58 if _platform == "linux" or _platform == "linux2":
59 enrollee_env.Upload(env.get('BUILD_DIR') + '/service/easy-setup/sampleapp/enrollee/arduino/enrollee.hex')
61 print 'Please use appropriate install method for your developing machine. Linux is the only supported platform right now.'