1 #******************************************************************
3 # Copyright 2015 Intel Mobile Communications GmbH All Rights Reserved.
5 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 ######################################################################
22 # raxmpp library build script
24 ######################################################################
30 src_dir = env.get('SRC_DIR')
31 target_os = env.get('TARGET_OS')
32 target_arch = env.get('TARGET_ARCH')
33 with_ra = env.get('WITH_RA')
35 # check 'raxmppl' library, if it doesn't exits, ask user to download it
36 if not os.path.exists('raxmpp'):
38 *********************************** Error: ***********************************************
39 * Please download ra_xmpp as following :
40 * $ git clone https://gerrit.iotivity.org/gerrit/iotivity-xmpp extlibs/raxmpp/raxmpp
41 ******************************************************************************************
45 print 'building with ra_xmpp'
46 if env.get('RELEASE'):
48 build_dir = os.path.join(src_dir, 'extlibs/raxmpp/raxmpp/out', target_os, target_arch, 'release/')
50 build_dir = os.path.join(src_dir, 'extlibs/raxmpp/raxmpp/out/', target_os, target_arch, 'debug/')
52 sconsflags = ' RELEASE=true' if env['RELEASE'] else ' RELEASE=false'
53 foo=commands.getoutput('scons external' + sconsflags )
55 foo=commands.getoutput('scons' + sconsflags )
58 env.AppendUnique(CPPPATH = src_dir+'/extlibs/raxmpp/raxmpp/ra_xmpp/',