source: pacpusframework/branches/0.0.x/scripts/build-igep.sh@ 296

Last change on this file since 296 was 255, checked in by gsanahuj, 11 years ago

nouvelle toolchain igep

  • Property svn:executable set to *
File size: 2.2 KB
Line 
1#!/usr/bin/env bash
2
3echo "##########################################################"
4echo "# ___________ ____ ______ __ __ _____ #"
5echo "# \____ \__ \ _/ ___\\____ \^| ^| \/ ___/ #"
6echo "# ^| ^|_^> ^> __ \\ \___^| ^|_^> ^> ^| /\___ \ #"
7echo "# ^| __(____ /\___ ^> __/^|____//____ ^> #"
8echo "# ^|__^| \/ \/^|__^| \/ #"
9echo "# #"
10echo "##########################################################"
11echo ""
12echo "========================================"
13echo " PACPUS BUILD IGEP "
14echo "========================================"
15
16#recupere cmake
17if [ -f ${OECORE_NATIVE_SYSROOT}/usr/bin/cmake ]; then
18 CMAKE_NATIVE=${OECORE_NATIVE_SYSROOT}/usr/bin/cmake
19else
20 echo "cross toolchain is not installed, please read https://devel.hds.utc.fr/projects/igep/wiki/toolchain/install"
21exit 1
22fi
23
24
25function usage {
26 echo Usage:
27 echo build-linux.sh [install_dir]
28 echo [install-dir] is optional
29 echo The script must be run in the build directory, which is 'trunk\build'
30 echo ""
31 echo Where:
32 echo install_dir is the installation directory of the library
33 echo ""
34 echo For instance, here is how to build Pacpus:
35 echo ../scripts/build-igep.sh "/opt/Pacpus"
36 echo ""
37 exit 1
38}
39
40function build {
41 # Initialize the build
42 $CMAKE_NATIVE .. -DPACPUS_INSTALL_DIR=$1 -DPACPUS_INSTALL_3RD=TRUE \
43 -DPACPUS_USE_LOG=TRUE -DCMAKE_BUILD_TYPE=Release \
44 -DPACPUS_INSTALL_WITH_VERSION_NUMBER=TRUE -DCMAKE_TOOLCHAIN_FILE=${OECORE_CMAKE_CROSS_TOOLCHAIN}
45 make
46 sudo make install
47 $CMAKE_NATIVE .. -DPACPUS_INSTALL_DIR=$1 -DPACPUS_INSTALL_3RD=TRUE \
48 -DPACPUS_USE_LOG=TRUE -DCMAKE_BUILD_TYPE=Debug
49 -DPACPUS_INSTALL_WITH_VERSION_NUMBER=TRUE -DCMAKE_TOOLCHAIN_FILE=${OECORE_CMAKE_CROSS_TOOLCHAIN} \
50 make
51 sudo make install
52 echo "Build finished"
53 exit 0
54}
55
56#Check if the user is in the build directory
57if [ `basename $PWD` == "build" ]; then
58 if [ $# -ne 1 ]; then
59 INST_PATH="/opt/pacpus"
60 else
61 INST_PATH=$1
62 fi
63 build $INST_PATH
64else
65 usage
66fi
Note: See TracBrowser for help on using the repository browser.