1+ #! /bin/bash
2+
3+ BCM_TOOLCAIN_DIR=/opt/softs/compilers/others/Broadcom/BCM_LNX_1_0_0
4+ CHANALD_TOOLCAIN_DIR=/opt/softs/toolchains/CANALD_KAONCO1200C_BCM7356_LNUX_01/v0.5_REL.8/platform_cfg/linux/compiler/mips4k_gcc_x86_linux_22
5+ NEWCO_TOOLCHAIN_DIR=/opt/softs/toolchains/NEWCO_HUMAXHDR1002S_BCM7356_LNUX_01/I.18.01.03.01_Evolution_MOR_Release6_Integration_ioctl_hijack/platform_cfg/linux/compiler/mips4k_gcc_x86_linux_11
6+ REF_TOOLCHAIN_DIR=/opt/softs/toolchains/REF_BCM97425_BCM7425_LNUX_01/M6.0.67_6.1_ioctl_hijack/platform_cfg/linux/compiler/mips4k_gcc_x86_linux_12
7+ ST40_CC14_0_1_TOOLCHAIN_DIR=/opt/softs/compilers/st/st40/LINUX_4.2.4.jan0711/STLinux-2.3/devkit/sh4_uclibc
8+ ST40_CC15_0_0_TOOLCHAIN_DIR=/opt/softs/compilers2/st/st40/LINUX_4.2.4_0.8.0/STLinux-2.4/devkit/sh4_uclibc
9+ UPCH_TOOLCHAIN_DIR=/opt/softs/toolchains/UPCH_SAMVGW_INTELGRV_LNUX_01/M16.0_126_7.1/platform_cfg/linux/compiler/i686_gcc_x86_linux_01/i686-linux-elf
10+ VOO_TOOLCHAIN_DIR=/opt/softs/toolchains/VOO_CISCOISB8K_BCM7241_LNUX_01/M6.0.75_M3_8.2/platform_cfg/linux/compiler/mips4k_gcc_x86_linux_22
11+
12+
13+ function SetPlatformVariable
14+ {
15+ TMP_MHA_TARGET=$1
16+ echo " In SetPlatformVariable " ${TmpTarget}
17+ # Set variables for the configure
18+ case $TMP_MHA_TARGET in
19+ desktop)
20+ export CC=gcc
21+ export CXX=g++
22+ export LINK=g++
23+ ;;
24+ BCM)
25+ export CC=${BCM_TOOLCAIN_DIR} /bin/mipsel-linux-uclibc-gcc
26+ export CXX=${BCM_TOOLCAIN_DIR} /bin/mipsel-linux-uclibc-g++
27+ export LINK=${BCM_TOOLCAIN_DIR} /bin/mipsel-linux-uclibc-g++
28+ ;;
29+ CHANALD)
30+ export CC=${CHANALD_TOOLCAIN_DIR} /bin/mipsel-linux-uclibc-gcc
31+ export CXX=${CHANALD_TOOLCAIN_DIR} /bin/mipsel-linux-uclibc-g++
32+ export LINK=${CHANALD_TOOLCAIN_DIR} /bin/mipsel-linux-uclibc-g++
33+ ;;
34+ NEWCO)
35+ export CC=${NEWCO_TOOLCHAIN_DIR} /bin/mipsel-linux-uclibc-gcc
36+ export CXX=${NEWCO_TOOLCHAIN_DIR} /bin/mipsel-linux-uclibc-g++
37+ export LINK=${NEWCO_TOOLCHAIN_DIR} /bin/mipsel-linux-uclibc-g++
38+ ;;
39+ REF)
40+ export CC=${REF_TOOLCHAIN_DIR} /bin/mipsel-linux-uclibc-gcc
41+ export CXX=${REF_TOOLCHAIN_DIR} /bin/mipsel-linux-uclibc-g++
42+ export LINK=${REF_TOOLCHAIN_DIR} /bin/mipsel-linux-uclibc-g++
43+ ;;
44+ ST40_CC14_0_1)
45+ export CC=${ST40_CC14_0_1_TOOLCHAIN_DIR} /bin/sh4-linux-uclibc-gcc
46+ export CXX=${ST40_CC14_0_1_TOOLCHAIN_DIR} /bin/sh4-linux-uclibc-g++
47+ export LINK=${ST40_CC14_0_1_TOOLCHAIN_DIR} /bin/sh4-linux-uclibc-g++
48+ ;;
49+ ST40_CC15_0_0)
50+ export CC=${ST40_CC15_0_0_TOOLCHAIN_DIR} /bin/sh4-linux-uclibc-gcc
51+ export CXX=${ST40_CC15_0_0_TOOLCHAIN_DIR} /bin/sh4-linux-uclibc-g++
52+ export LINK=${ST40_CC15_0_0_TOOLCHAIN_DIR} /bin/sh4-linux-uclibc-g++
53+ ;;
54+ UPCH)
55+ export CC=${UPCH_TOOLCHAIN_DIR} /bin/i686-cm-linux-gcc
56+ export CXX=${UPCH_TOOLCHAIN_DIR} /bin/i686-cm-linux-g++
57+ export LINK=${UPCH_TOOLCHAIN_DIR} /bin/i686-cm-linux-g++
58+ ;;
59+ VOO)
60+ export CC=${VOO_TOOLCHAIN_DIR} /bin/mipsel-linux-uclibc-gcc
61+ export CXX=${VOO_TOOLCHAIN_DIR} /bin/mipsel-linux-uclibc-g++
62+ export LINK=${VOO_TOOLCHAIN_DIR} /bin/mipsel-linux-uclibc-g++
63+ ;;
64+ esac
65+ }
66+
67+
68+ TARGET_LIST=$1
69+ MODE_LIST=$2
70+ OUTDIR=$3
71+
72+ if [ -z " $TARGET_LIST " ]
73+ then
74+ echo " TARGET = desktop"
75+ TARGET_LIST=" desktop"
76+ fi
77+
78+ if [ " $TARGET_LIST " = " all" ]
79+ then
80+ echo " TARGET = all"
81+ TARGET_LIST=" desktop BCM CHANALD NEWCO REF ST40_CC14_0_1 ST40_CC15_0_0 UPCH VOO"
82+ fi
83+
84+ if [ -z $MODE_LIST ]
85+ then
86+ echo " MODE = release_dbg release"
87+ MODE_LIST=" release_dbg release"
88+ fi
89+
90+ if [ -z " $OUTDIR " ]
91+ then
92+ OUTDIR=` pwd`
93+ fi
94+
95+ SUPPORTED_TARGETS=" desktop,BCM,CHANALD,NEWCO,REF,ST40_CC14_0_1,ST40_CC15_0_0,UPCH,VOO"
96+ SUPPORTED_MODES=" release_dbg,release"
97+
98+ for TmpTarget in $TARGET_LIST
99+ do
100+ targets=($( echo $SUPPORTED_TARGETS | sed ' s/,/\n/g' | grep -x $TmpTarget ) )
101+ if [ ! $targets ]
102+ then
103+ echo " Target \" $TmpTarget \" is not supported."
104+ exit -1;
105+ fi
106+ for TmpMode in $MODE_LIST
107+ do
108+ modes=($( echo $SUPPORTED_MODES | sed ' s/,/\n/g' | grep -x $TmpMode ) )
109+ if [ ! $modes ]
110+ then
111+ echo " Mode \" $TmpMode \" is not supported."
112+ exit -1;
113+ fi
114+ echo -e " \n************************************************"
115+ echo " Building" ${TmpTarget} ${TmpMode}
116+ echo " *************************************************"
117+ SetPlatformVariable $TmpTarget
118+ rm -f wd.gypi
119+ cp wd.gypi.${TmpTarget} wd.gypi
120+ if [ ! -f wd.gypi ]
121+ then
122+ echo " Create default wd.gypi"
123+ cp wd.gypi.common wd.gypi
124+ fi
125+ ./build.sh $OUTDIR ${TmpTarget} ${TmpMode} ${QT_DIR}
126+ done
127+ done
0 commit comments