From: George Nash Date: Thu, 15 Sep 2016 21:14:07 +0000 (-0700) Subject: [IOT-1294] install libraries when building WITH_RA_IBB flag X-Git-Tag: 1.3.0~1057^2~144 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8c8ec58fdc33c3950218575cb742d5209e67321e;p=platform%2Fupstream%2Fiotivity.git [IOT-1294] install libraries when building WITH_RA_IBB flag When building with the TEST option the libraries will be picked up at run time. Changed the order of libraries to prevent linker error related to the pthread library. Change-Id: I39e70dc33b774dcf46559306df0c5558975ec451 Signed-off-by: George Nash Reviewed-on: https://gerrit.iotivity.org/gerrit/11851 Reviewed-by: Dave Thaler Tested-by: jenkins-iotivity Reviewed-by: Rick Bell Tested-by: Rick Bell --- diff --git a/extlibs/libstrophe/SConscript b/extlibs/libstrophe/SConscript index 24177bf..9d20cb2 100644 --- a/extlibs/libstrophe/SConscript +++ b/extlibs/libstrophe/SConscript @@ -45,32 +45,40 @@ if with_ra_ibb: else: print 'Download xmpp library complete' - print 'Building with ' + SRC_NAME - #print 'base_dir', base_dir - #print 'target_os', target_os - #print 'target_arch', target_arch - - foo=commands.getoutput('patch -N -p1 -d libstrophe < strophe-xmpp_conn_is_secured.patch') - print foo - - os.chdir(SRC_NAME) - #sconsflags = ' RELEASE=true' if env['RELEASE'] else ' RELEASE=false' - if not os.path.exists('configure') : - foo=commands.getoutput('./bootstrap.sh') - print foo - if not os.path.exists('config.status') : - foo=commands.getoutput('./configure') + if not env.GetOption('clean'): + print 'Building with ' + SRC_NAME + #print 'base_dir', base_dir + #print 'target_os', target_os + #print 'target_arch', target_arch + + foo=commands.getoutput('patch -N -p1 -d libstrophe < strophe-xmpp_conn_is_secured.patch') print foo - if not os.path.exists('.libs/libstrophe.a') : - foo=commands.getoutput('make libstrophe.la') - print foo - if not os.path.exists('.libs/libstrophe.a') : - print 'Building with ' + SRC_NAME + ' failed.' - Exit(2) + os.chdir(SRC_NAME) + #sconsflags = ' RELEASE=true' if env['RELEASE'] else ' RELEASE=false' + if not os.path.exists('configure') : + foo=commands.getoutput('./bootstrap.sh') + print foo + if not os.path.exists('config.status') : + foo=commands.getoutput('./configure') + print foo + if not os.path.exists('.libs/libstrophe.a') : + foo=commands.getoutput('make libstrophe.la') + print foo + if not os.path.exists('.libs/libstrophe.a') : + print 'Building with ' + SRC_NAME + ' failed.' + Exit(2) + else: + foo = commands.getoutput('cp .libs/libstrophe.a ' + env.get('BUILD_DIR')) + foo = commands.getoutput('cp .libs/libstrophe.so* ' + env.get('BUILD_DIR')) + print foo - print 'Building with ' + SRC_NAME + ' Completely.' + print 'Building with ' + SRC_NAME + ' Completely.' env.AppendUnique(CPPPATH = [INC_PATH], RALIBS = LIBSTROPHY_LIBS, RALIBPATH = [LIB_PATH], RARPATH = [LIB_PATH]) env.AppendUnique(LIBS= LIBSTROPHY_LIBS, LIBPATH = [LIB_PATH]) -if env.GetOption('clean') : + +if env.GetOption('clean'): act = env.Action(['cd ' + SRC_PATH, 'make clean']) env.Execute(act) + if os.path.isfile(env.get('BUILD_DIR') + '/libstrophe.a'): + act2 = env.Action(['rm ' + env.get('BUILD_DIR') + '/libstrophe.*']) + env.Execute(act2) diff --git a/extlibs/wksxmppxep/SConscript b/extlibs/wksxmppxep/SConscript index 649033f..f8e9b2c 100644 --- a/extlibs/wksxmppxep/SConscript +++ b/extlibs/wksxmppxep/SConscript @@ -44,23 +44,31 @@ if with_ra_ibb: else: print 'Download', SRC_NAME, 'library complete' - print 'Building with ' + SRC_NAME - os.chdir(SRC_NAME) - if not os.path.exists('libwksxmppxep.so') : - LIBSTROPHE_BASE=base_dir + '/extlibs/libstrophe/libstrophe' - foo=commands.getoutput('make LIBSTROPHE_BASE=' + LIBSTROPHE_BASE + ' libraries') - print foo - - if not os.path.exists('libwksxmppxep.so') : - print 'Building with ' + SRC_NAME + ' failed.' - Exit(2) - - print 'Building with ' + SRC_NAME + ' Completely.' + if not env.GetOption('clean'): + print 'Building with ' + SRC_NAME + os.chdir(SRC_NAME) + if not os.path.exists('libwksxmppxep.so') : + LIBSTROPHE_BASE=base_dir + '/extlibs/libstrophe/libstrophe' + foo=commands.getoutput('make LIBSTROPHE_BASE=' + LIBSTROPHE_BASE + ' libraries') + print foo + if not os.path.exists('libwksxmppxep.so') : + print 'Building with ' + SRC_NAME + ' failed.' + Exit(2) + else: + foo = commands.getoutput('cp libwksxmppxep.so ' + env.get('BUILD_DIR')) + print foo + foo = commands.getoutput('cp libwksxmppxep.a ' + env.get('BUILD_DIR')) + print foo + + print 'Building with ' + SRC_NAME + ' Completely.' env.PrependUnique(CPPPATH = [INC_PATH], RALIBS = WJSXMPPXEP_LIBS, RALIBPATH = [LIB_PATH], RARPATH = [LIB_PATH]) - env.PrependUnique(LIBS = WJSXMPPXEP_LIBS, LIBPATH = [LIB_PATH]) - env.PrependUnique(LIBS = ['boost_system', 'boost_thread']) + env.AppendUnique(LIBS = WJSXMPPXEP_LIBS, LIBPATH = [LIB_PATH]) + env.AppendUnique(LIBS = ['boost_system', 'boost_thread']) if env.GetOption('clean') : act = env.Action(['cd ' + SRC_PATH, 'make clean']) env.Execute(act) + if os.path.isfile(env.get('BUILD_DIR') + '/libwksxmppxep.so'): + act2 = env.Action(['rm ' + env.get('BUILD_DIR') + '/libwksxmppxep.*']) + env.Execute(act2) \ No newline at end of file