1 #******************************************************************
3 # Copyright 2015 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 # Plugin Interface build script
28 target_os = env.get('TARGET_OS')
29 src_dir = env.get('SRC_DIR')
30 tw_path = os.path.join(src_dir, 'plugins')
32 #####################################################################
33 # Source files and Target(s)
34 ######################################################################
36 print"Reading Telegesis Wrapper (TW) script"
38 env.AppendUnique(CPPPATH = [ os.path.join(tw_path, 'include'),
39 os.path.join(tw_path, 'include', 'internal'),
40 os.path.join(src_dir, 'resource', 'oc_logger', 'include'),
41 os.path.join(src_dir, 'resource', 'csdk', 'stack', 'include'),
42 os.path.join(src_dir, 'resource', 'csdk', 'logger', 'include'),
43 os.path.join(src_dir, 'resource', 'c_common', 'oic_string', 'include'),
44 os.path.join(tw_path, 'zigbee_wrapper', 'telegesis_wrapper', 'include')
47 if target_os not in ['arduino', 'windows', 'winrt']:
48 env.AppendUnique(CPPDEFINES = ['WITH_POSIX'])
50 if target_os in ['darwin','ios']:
51 env.AppendUnique(CPPDEFINES = ['_DARWIN_C_SOURCE'])
54 os.path.join(src_dir, 'resource', 'c_common', 'oic_string', 'src', 'oic_string.c'),
55 os.path.join(src_dir, 'resource', 'csdk', 'logger', 'src', 'logger.c'),
56 'telegesis_wrapper.c',
59 env.AppendUnique(TW_SRC = tw_src)
61 if target_os in ['android', 'tizen']:
62 calib = env.SharedLibrary('telegesis_wrapper', env.get('TW_SRC'))
64 calib = env.StaticLibrary('telegesis_wrapper', env.get('TW_SRC'))
65 env.InstallTarget(calib, 'libtelegesis_wrapper')
66 env.UserInstallTargetLib(calib, 'libtelegesis_wrapper')