LingYun Studio embeded system framwork software, such as thirdparty build shell and lingyun library
guowenxue
2024-08-21 7deaa4a49b1d0fb2112a69719141709b9c261c7c
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
#!/bin/bash
 
function do_compile
{
    for dir in `ls`
    do  
        if [ -f $dir/build*.sh ] ; then
            cd $dir
               ./build*.sh
            cd -
        fi  
    done
}
 
function do_distclean
{
    for dir in `ls`
    do  
        if [ -f $dir/build*.sh ] ; then
            rm -rf ${dir}/${dir}*
        fi  
    done
}
 
if [ $# == 1 ] ; then 
    if [ $1 == "clean" ] ; then 
        rm -rf install
        exit;
    elif [ $1 == "distclean" ] ; then
        rm -rf install
        do_distclean
        exit;
    fi  
 
    # export cross compiler
    if echo $1 | grep "\-linux\-" > /dev/null 2>&1 ; then
        export CROSS_COMPILE=$1
        echo -e "\033[40;33m --W-- export cross compiler $CROSS_COMPILE \033[0m\n"
    fi
fi
 
 
do_compile