1 #######################################################################
2 # Copyright 2016 Samsung Electronics All Rights Reserved.
4 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20 ######################################################################
21 # Build script for Linux Enrollee Sample App
22 ######################################################################
26 print Dir('#').abspath
27 print Dir('.').abspath
29 enrollee_env = env.Clone()
30 transport = enrollee_env.get('TARGET_TRANSPORT')
32 ######################################################################
34 ######################################################################
35 enrollee_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
36 enrollee_env.AppendUnique(CXXFLAGS = ['-Wall', '-std=c++0x'])
38 if env.get('RELEASE'):
39 enrollee_env.AppendUnique(CCFLAGS = ['-Os'])
40 enrollee_env.AppendUnique(CPPDEFINES = ['NDEBUG'])
42 enrollee_env.AppendUnique(CCFLAGS = ['-g'])
44 if env.get('LOGGING'):
45 env.AppendUnique(CPPDEFINES = ['TB_LOG'])
47 enrollee_env.PrependUnique(CPPPATH = [
48 env.get('SRC_DIR') + '/resource/include',
49 env.get('SRC_DIR') + '/resource/oc_logger/include',
50 env.get('SRC_DIR') + '/resource/csdk/logger/include',
51 env.get('SRC_DIR') + '/resource/csdk/stack/include',
52 env.get('SRC_DIR') + '/extlibs/cjson',
53 env.get('SRC_DIR') + '/service/easy-setup/inc',
54 env.get('SRC_DIR') + '/service/easy-setup/enrollee/linux/wifi',
55 env.get('SRC_DIR') + '/service/easy-setup/enrollee/inc',
56 env.get('SRC_DIR') + '/service/easy-setup/enrollee/src'])
58 enrollee_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'ocsrm', 'pthread', 'connectivity_abstraction','coap', 'ESEnrolleeSDK'])
59 if enrollee_env.get('SECURED') == '1':
60 enrollee_env.PrependUnique(LIBS = ['ocpmapi', 'ocprovision'])
62 enrollee = enrollee_env.Program('enrollee', 'enrolleewifi.c')
64 i_enrollee = enrollee_env.Install(env.get('BUILD_DIR'), enrollee)
66 Alias('enrollee', i_enrollee)
67 env.AppendTarget('enrollee')