# External library include files are in <src_dir>/deps/<target_os>/include
# the library binaries are in <src_dir>/deps/<target_os>/lib/<arch>
-env.AppendUnique(CPPPATH = [env.get('SRC_DIR') + '/deps/' + target_os + '/include'])
-env.AppendUnique(LIBPATH = [env.get('SRC_DIR') + '/deps/' + target_os + '/lib/' + target_arch])
+env.AppendUnique(CPPPATH = [os.path.join(env.get('SRC_DIR'), 'deps', target_os, 'include')])
+env.AppendUnique(LIBPATH = [os.path.join(env.get('SRC_DIR'), 'deps', target_os, 'lib', target_arch)])
# Check whether a library exists, if not, notify user to install it or try to
# download the source code and build it
if path:
dir = path
else:
- dir = env.get('SRC_DIR') + '/extlibs/' + libname
+ dir = os.path.join(env.get('SRC_DIR'), 'extlibs', libname)
# Execute the script to download(if required) and build source code
if script:
- st = dir + '/' + script
+ st = os.path.join(dir, script)
else:
- st = dir + '/SConscript'
+ st = os.path.join(dir, 'SConscript')
if os.path.exists(st):
SConscript(st)
# Install header file(s) to <src_dir>/deps/<target_os>/include
def __install_head_file(ienv, file):
- return ienv.Install(env.get('SRC_DIR') + '/deps/' + target_os + '/include', file)
+ return ienv.Install(os.path.join(env.get('SRC_DIR'), 'dep', target_os, target_arch, 'usr', 'include'), file)
# Install library binaries to <src_dir>/deps/<target_os>/lib/<arch>
def __install_lib(ienv, lib):
- return ienv.Install(env.get('SRC_DIR') + '/deps/' + target_os + '/lib/' + target_arch, lib)
+ return ienv.Install(os.path.join(env.get('SRC_DIR'), 'dep', target_os, target_arch, 'usr', 'lib'), lib)
SConscript('tools/UnpackAll.py')
+# tinycbor build/fetch
+SConscript(os.path.join(env.get('SRC_DIR'), 'extlibs', 'tinycbor', 'SConscript'))
+
+with_ra = env.get('WITH_RA')
+if with_ra:
+ SConscript(os.path.join(env.get('SRC_DIR'), 'extlibs', 'raxmpp', 'SConscript'))
+
+with_ra_ibb = env.get('WITH_RA_IBB')
+if with_ra_ibb:
+ SConscript(os.path.join(env.get('SRC_DIR'), 'extlibs', 'wksxmppxep', 'SConscript'))
+
+
env.AddMethod(__prepare_lib, "PrepareLib")
env.AddMethod(__configure, "Configure")
env.AddMethod(__download, "Download")
env.AddMethod(__install_head_file, "InstallHeadFile")
env.AddMethod(__install_lib, "InstallLib")
+
+if env.get('SECURED') == '1':
+ SConscript(os.path.join(env.get('SRC_DIR'), 'extlibs', 'sqlite3', 'SConscript'))