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

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

script igep

  • Property svn:executable set to *
File size: 2.4 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 /opt/poky/latest/sysroots/x86_64-pokysdk-linux/usr/bin/cmake ]; then
18 CMAKE_NATIVE=/opt/poky/latest/sysroots/x86_64-pokysdk-linux/usr/bin/cmake
19elif [ -f /opt/poky/latest/sysroots/i686-pokysdk-linux/usr/bin/cmake ]; then
20 CMAKE_NATIVE=/opt/poky/latest/sysroots/i686-pokysdk-linux/usr/bin/cmake
21else
22 echo "la toolchain n'est pas installée, lire https://devel.hds.utc.fr/projects/igep/wiki/toolchain/install"
23exit 1
24fi
25
26
27function usage {
28 echo Usage:
29 echo build-linux.sh [install_dir]
30 echo [install-dir] is optional
31 echo The script must be run in the build directory, which is 'trunk\build'
32 echo ""
33 echo Where:
34 echo install_dir is the installation directory of the library
35 echo ""
36 echo For instance, here is how to build Pacpus:
37 echo ../scripts/build-igep.sh "/opt/Pacpus"
38 echo ""
39 exit 1
40}
41
42function build {
43 # Initialize the build
44 $CMAKE_NATIVE .. -DPACPUS_INSTALL_DIR=$1 -DPACPUS_INSTALL_3RD=TRUE \
45 -DPACPUS_USE_LOG=TRUE -DCMAKE_BUILD_TYPE=Release \
46 -DPACPUS_INSTALL_WITH_VERSION_NUMBER=TRUE -DCMAKE_TOOLCHAIN_FILE=/opt/poky/toolchain.cmake
47 make
48 sudo make install
49 $CMAKE_NATIVE .. -DPACPUS_INSTALL_DIR=$1 -DPACPUS_INSTALL_3RD=TRUE \
50 -DPACPUS_USE_LOG=TRUE -DCMAKE_BUILD_TYPE=Debug
51 -DPACPUS_INSTALL_WITH_VERSION_NUMBER=TRUE -DCMAKE_TOOLCHAIN_FILE=/opt/poky/toolchain.cmake \
52 make
53 sudo make install
54 echo "Build finished"
55 exit 0
56}
57
58#Check if the user is in the build directory
59if [ `basename $PWD` == "build" ]; then
60 if [ $# -ne 1 ]; then
61 INST_PATH="/opt/pacpus"
62 else
63 INST_PATH=$1
64 fi
65 build $INST_PATH
66else
67 usage
68fi
Note: See TracBrowser for help on using the repository browser.