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 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
24 target_os = env.get('TARGET_OS')
25 samples_env = env.Clone()
26 src_dir = env.get('SRC_DIR')
27 pi_dir = os.path.join(src_dir, 'plugins')
29 ######################################################################
31 ######################################################################
32 samples_env.PrependUnique(CPPPATH = [
33 '../../../resource/oc_logger/include',
34 '../../../resource/csdk/logger/include',
35 '../../../resource/csdk/stack/include',
36 '../../../extlibs/cjson',
37 os.path.join(pi_dir, 'include')
40 samples_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-Wextra', '-Werror'])
41 samples_env.AppendUnique(RPATH = [env.get('BUILD_DIR')])
42 samples_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
44 if target_os in ['darwin', 'ios']:
45 samples_env.PrependUnique(LIBS = ['m',
48 'connectivity_abstraction',
50 elif target_os not in ['arduino']:
51 samples_env.PrependUnique(LIBS = ['m',
54 'connectivity_abstraction',
57 samples_env.AppendUnique(LIBS = ['rt'])
59 if env.get('SECURED') == '1':
60 samples_env.AppendUnique(LIBS = ['tinydtls'])
62 samples_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
64 ######################################################################
65 # Source files and Targets
66 ######################################################################
67 iotivityandzigbeeserver = samples_env.Program('iotivityandzigbeeserver',
68 ['IotivityandZigbeeServer.c'])
69 iotivityandzigbeeclient = samples_env.Program('iotivityandzigbeeclient',
70 ['IotivityandZigbeeClient.c'])
72 list_of_samples = [iotivityandzigbeeserver, iotivityandzigbeeclient]
74 Alias("samples", list_of_samples)
76 env.AppendTarget('samples')