Fix build error with scons-4.4.0 version which is based on python3
[platform/upstream/iotivity.git] / resource / csdk / connectivity / src / ip_adapter / SConscript
index db06815..dfa79e3 100644 (file)
@@ -5,7 +5,7 @@
 Import('env')
 import os.path
 
-print "Reading IP adapter script"
+print("Reading IP adapter script")
 
 target_os = env.get('TARGET_OS')
 inc_files = env.get('CPPPATH')
@@ -21,8 +21,10 @@ if target_os == 'arduino':
 else:
     common_files = [
         os.path.join(src_dir, 'caipadapter.c'),
-       os.path.join(src_dir, 'caipclient.c'),
-       os.path.join(src_dir, 'caipserver.c') ]
+        os.path.join(src_dir, 'caipserver.c'),
+        os.path.join(src_dir, 'caipnwmonitor_common.c') ]
+
+env.AppendUnique(CPPPATH = [ src_dir ])
 
 # Get list of target-specific source file base names, i.e. no parent
 # directories prepended to the path.
@@ -45,12 +47,16 @@ if os.path.exists(target_sconscript_abspath):
 target_files = [ os.path.join(src_dir, target_os, f) for f in target_files ]
 
 # Source files to build for Linux-like platforms
-if target_os in ['linux','darwin','ios']:
+if target_os in ['linux','darwin','tizenrt']:
     target_files += [ os.path.join(src_dir,
                                    'linux/caipnwmonitor.c') ]
 
+if target_os in ['ios']:
+    target_files += [ os.path.join(src_dir, 'ios/caipnwmonitor.m') ]
+
+if target_os in ['msys_nt']:
+       target_files += [ os.path.join(src_dir, 'windows/caipnwmonitor.c') ]
+
 # The list of BLE adapter source files is a combination of both the
 # common and target-specific source file lists.
 env.AppendUnique(CA_SRC = common_files + target_files)
-
-