source: pacpustutorials/template/project_template/build/build_linux.sh@ 8

Last change on this file since 8 was 8, checked in by DHERBOMEZ Gérald, 9 years ago

remove sudo

  • Property svn:executable set to *
File size: 645 bytes
Line 
1#!/bin/bash
2
3set -e
4
5if [ -z $PACPUS_ROOT ]; then
6 echo PACPUS_ROOT environment variable does not exist, please set it the folder in which you have installed pacpusframework.
7else
8
9 # the following line will create a folder like: build_opt_pacpus_0.2.0_
10 BUILD_DIR=./build${PACPUS_ROOT////_}
11 echo Your files will be built in: $BUILD_DIR
12
13 if [ -z $1 ]; then J="1"; else J="$1";
14 fi
15
16 if [ "$TARGET_PREFIX" == "arm-poky-linux-gnueabi-" ]; then
17 echo The environment is configured for poky_arm
18 exit 1
19 fi
20
21 if [ -d "$BUILD_DIR" ]; then
22 rm -rf $BUILD_DIR
23 fi
24
25 mkdir $BUILD_DIR
26 cd $BUILD_DIR
27
28 cmake ../..
29
30 make -j$J
31 make install
32
33fi
34
Note: See TracBrowser for help on using the repository browser.