Last change
on this file since 332 was 302, checked in by Sanahuja Guillaume, 6 years ago |
modifs nouveau build system
|
-
Property svn:executable
set to
*
|
File size:
1.3 KB
|
Rev | Line | |
---|
[302] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | function info () {
|
---|
| 4 | echo -e "\033[32m$1\033[0m"
|
---|
| 5 | }
|
---|
| 6 |
|
---|
| 7 | function warn () {
|
---|
| 8 | echo -e "\033[33m$1\033[0m"
|
---|
| 9 | }
|
---|
| 10 |
|
---|
| 11 | function err () {
|
---|
| 12 | echo -e "\033[31m$1\033[0m"
|
---|
| 13 | exit 1
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | if [ $(uname -m) != "x86_64" ]; then
|
---|
| 17 | err "unsupported host architecture, you need a x86_64 cpu"
|
---|
| 18 | fi
|
---|
| 19 |
|
---|
| 20 | if ! [ -f ./CMakeLists.txt ]; then
|
---|
| 21 | err "Current directory does not contain CMakeLists.txt"
|
---|
| 22 | fi
|
---|
| 23 |
|
---|
| 24 | #get cmake
|
---|
| 25 | CMAKE=${OECORE_HOST_NATIVE_SYSROOT}/usr/bin/cmake
|
---|
| 26 |
|
---|
| 27 | #verifie l'existence du lien symbolique build
|
---|
| 28 | if [ -d build ];then
|
---|
| 29 | if ! readlink build > /dev/null ; then
|
---|
| 30 | #it is a directory, exit to do not erase anything
|
---|
| 31 | err "Error: build already exsits and is a directory; it should be a symlink."
|
---|
| 32 | fi
|
---|
| 33 | if ! readlink build | grep -w build_core2_64 >/dev/null; then
|
---|
| 34 | warn "Warning, build was pointing to another directory."
|
---|
| 35 | fi
|
---|
| 36 | rm build
|
---|
| 37 | fi
|
---|
| 38 |
|
---|
| 39 | #iterate over available toolchains
|
---|
| 40 | toolchains=($OECORE_CMAKE_TOOLCHAINS)
|
---|
| 41 | for arch in ${toolchains[@]}; do
|
---|
| 42 | info "************* Creating project for $arch *************"
|
---|
| 43 | toolchain=$(eval "echo \"\$OECORE_CMAKE_${arch^^}_TOOLCHAIN\"")
|
---|
| 44 | mkdir -p build_${arch}
|
---|
| 45 | cd build_${arch}
|
---|
| 46 | rm -f CMakeCache.txt
|
---|
| 47 | rm -rf CMakeFiles
|
---|
| 48 |
|
---|
| 49 | ${CMAKE} ../ -G "CodeLite - Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=${toolchain} -DCMAKE_CODELITE_USE_TARGETS=ON
|
---|
| 50 | cd ..
|
---|
| 51 | done
|
---|
| 52 |
|
---|
| 53 | #creation du lien symbolique
|
---|
| 54 | ln -s build_core2_64 build
|
---|
Note:
See
TracBrowser
for help on using the repository browser.