-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenCMake.sh
executable file
·51 lines (49 loc) · 996 Bytes
/
genCMake.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash -
#===============================================================================
#
# FILE: genCMake.sh
#
# USAGE: ./genCMake.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: YOUR NAME (),
# ORGANIZATION:
# CREATED: Sunday 21 December 2014 20:30
# REVISION: ---
#===============================================================================
set -o nounset # Treat unset variables as an error
mkdir -p build
cd build
str=""
case $1 in
avr)
str="-DCMAKE_TOOLCHAIN_FILE=~/cmakefiles/avr-toolchain.cmake"
mkdir -p ../bin/eep
mkdir -p ../bin/elf
mkdir -p ../bin/hex
mkdir -p ../bin/map
cmake "${str}" $@
make
shift
;;
arm)
str="-DCMAKE_TOOLCHAIN_FILE=~/cmakefiles/arm-toolchain.cmake"
#source ${PROJECTS}/ros-projects-arm/env-arm-ros.sh
cmake "${str}" $@
#make
shift
;;
pc)
cmake $@
make
;;
*)
echo "Error please give a platform to build tool"
;;
esac
cd ..