modified for systemd journal support
[framework/system/dlog.git] / build.sh
1 #!/bin/sh
2
3 ### WARNING: DO NOT CHANGE CODES from HERE !!! ###
4 #import setup
5 cd `dirname $0`
6 _PWD=`pwd`
7 pushd ./ > /dev/null
8 while [ ! -f "./xo-setup.conf" ]
9 do
10     cd ../
11     SRCROOT=`pwd`
12     if [ "$SRCROOT" == "/" ]; then
13         echo "Cannot find xo-setup.conf !!"
14         exit 1
15     fi
16 done
17 popd > /dev/null
18 . ${SRCROOT}/xo-setup.conf
19 cd ${_PWD}
20 ### WARNING: DO NOT CHANGE CODES until HERE!!! ###
21
22 CFLAGS="${CFLAGS}"
23 export VERSION=1.0
24
25 if [ "$MACHINE" == "volans" ]; then
26     #export DEVELOP_VER=yes
27     CFLAGS="${CFLAGS} -D__VOLANS"
28 fi
29
30
31 if [ $1 ];
32 then
33     run make $1 || exit 1
34 else
35     mkdir -p /opt/etc/
36 #    mkdir -p /opt/data/.debug/symbol/
37                 if [ -z "$USE_AUTOGEN" ]; then
38             run ./autogen.sh || exit 1
39             run ./configure --prefix=$PREFIX || exit 1
40                 fi
41     run make || exit 1
42     run make install || exit 1
43     mkdir -p ${PREFIX}/bin/
44     if [ "$DISTRO" = "vodafone-sdk" ]; then
45         make_pkg_option="{make_pkg_option} --postjob=./make_openapi.sh"
46     fi
47     run make_pkg.sh ${make_pkg_option} || exit 1        
48 fi
49