#
##
-import os
-
Import('env')
target_os = env.get('TARGET_OS')
src_dir = env.get('SRC_DIR')
-if target_os not in ['arduino', 'darwin', 'ios']:
+# Build liblogger
+SConscript('csdk/logger/SConscript')
+
+if target_os not in ['arduino', 'darwin', 'ios', 'android', 'msys_nt', 'windows']:
env.AppendUnique(LIBS=['rt'])
# Build libcoap
SConscript('csdk/connectivity/lib/libcoap-4.1.1/SConscript')
+# Build C Common dependencies
+SConscript('c_common/SConscript')
+
# Build connectivity
SConscript('csdk/connectivity/SConscript')
+if env.get('ROUTING') in ['GW', 'EP']:
+ # Build Routing
+ SConscript('csdk/routing/SConscript')
+
+# Build libocsrm
+SConscript('csdk/security/SConscript')
+
# Build liboctbstack
SConscript('csdk/SConscript')
-if target_os not in ['arduino','darwin']:
+if target_os not in ['arduino','darwin','ios']:
# Build liboc_logger
SConscript('oc_logger/SConscript')
# Build liboc
SConscript('src/SConscript')
-if target_os not in ['arduino','darwin', 'android']:
+if target_os not in ['arduino','darwin','ios','android']:
# Build examples
SConscript('examples/SConscript')
-if target_os == 'linux':
+if target_os in ['linux', 'windows']:
# Build C Samples
+ SConscript('csdk/stack/test/linux/SConscript')
SConscript('csdk/stack/samples/linux/SimpleClientServer/SConscript')
# Build secure samples
SConscript('unit_tests.scons')
elif target_os == 'darwin':
- # Build linux samples for now.
+ env.Command('../../out/darwin/iotivity-csdk.framework',None,src_dir + '/tools/darwin/mkfwk_osx.sh')
+ # Build linux samples for now
SConscript('csdk/stack/samples/linux/SimpleClientServer/SConscript')
# Build C stack's unit tests.
elif target_os == 'arduino':
SConscript('csdk/stack/samples/arduino/SimpleClientServer/ocserver/SConscript')
+
+elif target_os == 'msys_nt':
+ # Build secure samples. Using linux samples for now.
+ SConscript('csdk/stack/samples/linux/secure/SConscript')
+
+ # Build C/C++ unit tests
+ SConscript('unit_tests.scons')