1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
# Copyright AllSeen Alliance. All rights reserved.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Import('config_env')
if not config_env.has_key('_ALLJOYNCORE_'):
config_env.Append(LIBS = ['alljoyn'])
if config_env['BR'] == 'on' :
config_env['ajrlib'] = 'ajrouter'
if config_env['OS'] == 'openwrt':
config_env.AppendUnique(LIBS = [ 'stdc++', 'pthread' ])
if config_env['OS'] == 'linux':
config_env.AppendUnique(LIBS = [ 'pthread' ])
config_env.Append(LINKFLAGS = ['-fPIE', '-pie', '-fPIC'])
config_env.Append(CFLAGS = ['-fPIE', '-fPIC', '-D_FORTIFY_SOURCE=2'])
config_env.Append(CPPFLAGS = ['-fPIE', '-fPIC', '-D_FORTIFY_SOURCE=2'])
config_env['SHLIBVERSIONFLAGS'] = " "
# Make config dist a sub-directory of the alljoyn dist. This avoids any conflicts with alljoyn dist targets.
config_env['CONFIG_DISTDIR'] = config_env['DISTDIR'] + '/config'
config_env.Install('$CONFIG_DISTDIR/inc/alljoyn/config', config_env.Glob('inc/alljoyn/config/*.h'))
# Libraries
config_env.Install('$CONFIG_DISTDIR/lib', config_env.SConscript('src/SConscript', exports = ['config_env']))
# Sample programs
if config_env['BUILD_SERVICES_SAMPLES'] == 'on':
config_env.Install('$CONFIG_DISTDIR/bin', config_env.SConscript('samples/SConscript', exports = ['config_env']))
# Build docs
installDocs = config_env.SConscript('docs/SConscript', exports = ['config_env'])
config_env.Depends(installDocs, config_env.Glob('$CONFIG_DISTDIR/inc/alljoyn/config/*.h'));
|