Directory Structuring
diff --git a/wscript b/wscript
index 5fc6407..cdceeaa 100644
--- a/wscript
+++ b/wscript
@@ -4,13 +4,15 @@
def options(opt):
opt.load('compiler_c compiler_cxx gnu_dirs c_osx')
- opt.load('boost', tooldir=['waf-tools'])
+ opt.load('boost cryptopp', tooldir=['waf-tools'])
opt = opt.add_option_group('Options')
opt.add_option('--debug',action='store_true',default=False,dest='debug',help='''debugging mode''')
+ opt.add_option('--without-osx-keychain', action='store_false', default=True, dest='with_osx_keychain',
+ help='''On Darwin, do not use OSX keychain as a default TPM''')
def configure(conf):
- conf.load("compiler_cxx boost gnu_dirs")
+ conf.load("compiler_c compiler_cxx boost gnu_dirs c_osx cryptopp")
if conf.options.debug:
conf.define ('_DEBUG', 1)
@@ -33,17 +35,33 @@
flags = ['-O3', '-g', '-Wno-tautological-compare','-Wno-unused-variable',
'-Wno-unused-function', '-Wno-deprecated-declarations']
conf.add_supported_cxxflags (cxxflags = flags)
+ if Utils.unversioned_sys_platform () == "darwin":
+ conf.check_cxx(framework_name='CoreFoundation', uselib_store='OSX_COREFOUNDATION', mandatory=True)
+ conf.check_cxx(framework_name='CoreServices', uselib_store='OSX_CORESERVICES', mandatory=True)
+ conf.check_cxx(framework_name='Security', uselib_store='OSX_SECURITY', define_name='HAVE_SECURITY',
+ use="OSX_COREFOUNDATION", mandatory=True)
+ conf.define('HAVE_OSX_SECURITY', 1)
conf.check_cfg(package='libndn-cpp-dev', args=['--cflags', '--libs'], uselib_store='NDN_CPP', mandatory=True)
conf.check_boost(lib='system iostreams thread unit_test_framework log', uselib_store='BOOST', version='1_55', mandatory=True)
conf.check_cfg(package='nsync', args=['--cflags', '--libs'], uselib_store='nsync', mandatory=True)
+ conf.check_cfg(package='sqlite3', args=['--cflags', '--libs'], uselib_store='SQLITE3', mandatory=True)
+ conf.check_cryptopp(path=conf.options.cryptopp_dir, mandatory=True)
+
+ if Utils.unversioned_sys_platform () == "darwin":
+ conf.env['WITH_OSX_KEYCHAIN'] = conf.options.with_osx_keychain
+ if conf.options.with_osx_keychain:
+ conf.define('WITH_OSX_KEYCHAIN', 1)
+ else:
+ conf.env['WITH_OSX_KEYCHAIN'] = False
def build (bld):
bld (
features=['cxx', 'cxxprogram'],
target="nlsr",
- source = bld.path.ant_glob('src/*.cpp'),
- use = 'NDN_CPP BOOST nsync',
+ source = bld.path.ant_glob('src/**/*.cpp'),
+ use = 'NDN_CPP BOOST CRYPTOPP SQLITE3 nsync',
+ includes = ". src"
)
@Configure.conf