1 #######################################################
3 #######################################################
8 print "Reading TCP adapter script"
10 target_os = env.get('TARGET_OS')
11 inc_files = env.get('CPPPATH')
12 secured = env.get('SECURED')
13 src_dir = './tcp_adapter/'
16 # Source files to build common for all platforms
18 if target_os in ['linux', 'tizen', 'android', 'ios', 'tizenrt']:
20 os.path.join(src_dir, 'catcpadapter.c'),
21 os.path.join(src_dir, 'catcpserver.c') ]
23 common_files = [os.path.join(src_dir, 'catcpadapter.c')]
25 # Get list of target-specific source file base names, i.e. no parent
26 # directories prepended to the path.
28 # Target-specific SConscript files are expected to return that list.
30 target_sconscript = os.path.join(target_os, 'SConscript')
32 # Check for the existence of the platform-specific SConscript file
33 # relative to the top-level source directory, not the build (variant)
34 # directory, before calling that SConscript file to prevent a missing
35 # file warning platforms that don't provide one.
36 target_sconscript_abspath = str(File(target_sconscript).srcnode().abspath)
37 if os.path.exists(target_sconscript_abspath):
38 target_files = env.SConscript(target_sconscript, exports='src_dir')
40 # Now prepend the appropriate parent directories
41 # (e.g. ./ip_adapter/android) to each of the target source files in
43 target_files = [ os.path.join(src_dir, target_os, f) for f in target_files ]
45 # Source files to build for Linux-like platforms
47 # The list of TCP adapter source files is a combination of both the
48 # common and target-specific source file lists.
49 env.AppendUnique(CA_SRC = common_files + target_files)