3 ## -- CAANOO USER SETTINGS
5 ## CAANOO - This should point to the root of your tool-chain {i.e. folder above the BIN dir}
7 CAANOO
=/opt
/caanoo
/gcc-4.2
.4-glibc-2.7
-eabi/arm-gph-linux-gnueabi
9 ## HOST and TARGET - These should be the canonical tool names of your tool.
10 ## For the sake of this script HOST and TARGET should be the same.
11 ## Defaults would be 'arm-gph-linux-gnueabi' for a normal Caanoo tool-chain.
13 HOST
=arm-gph-linux-gnueabi
14 TARGET
=arm-gph-linux-gnueabi
16 PKG_CONFIG_PATH
=${CAANOO}/lib
/pkgconfig
18 ## -- END CAANOO USER SETTINGS
23 export PKG_CONFIG_PATH
28 PATH
=$CAANOO/bin
:$PATH
31 #ln -s `whereis -b pkg-config | sed 's/pkg-config\: //g'` /opt/caanoo/gcc-4.2.4-glibc-2.7-eabi/arm-gph-linux-gnueabil/bin/pkg-config
33 # Do not edit below here
34 CC
="${CAANOO}/../bin/${HOST}-gcc"
35 CXX
="${CAANOO}/../bin/${HOST}-g++"
36 AR
="${CAANOO}/../bin/${HOST}-ar"
37 STRIP
="${CAANOO}/../bin/${HOST}-strip"
38 RANLIB
="${CAANOO}/../bin/${HOST}-ranlib"
40 #CFLAGS="-DTARGET_CAANOO -O2 -ffast-math -fomit-frame-pointer -mcpu=arm920t -DARM -D_ARM_ASSEM_ -I${CAANOO}/include -I${CAANOO}/include/libxml2 -I${CAANOO}/include/SDL"
41 #CFLAGS="-DTARGET_CAANOO -mcpu=arm926ej-s -mtune=arm926ej-s -fsigned-char -O3 -msoft-float -fomit-frame-pointer -fstrict-aliasing -mstructure-size-boundary=32 -fexpensive-optimizations -fweb -frename-registers -falign-functions=16 -falign-loops -falign-labels -falign-jumps -finline -finline-functions -fno-common -fno-builtin -fsingle-precision-constant -DARM -D_ARM_ASSEM_ -I${CAANOO}/include -I${CAANOO}/include/libxml2 -I${CAANOO}/include/SDL"
42 CFLAGS
="-DTARGET_CAANOO -mcpu=arm926ej-s -mtune=arm926ej-s -O3 -DARM -D_ARM_ASSEM_ -I${CAANOO}/include -I${CAANOO}/include/libxml2 -I${CAANOO}/include/SDL"
43 LDFLAGS
="-L${CAANOO}/lib"
44 #PKG_CONFIG="${CAANOO}/bin/pkg-config"
55 echo Current settings.
57 echo Install root
/Working dir
= $CAANOO
58 echo Tool locations
= $CAANOO/bin
59 echo Host
/Target
= $HOST / $TARGET
69 echo LDFLAGS
= $LDFLAGS
70 echo PKG_CONFIG
= $PKG_CONFIG
72 echo "### Building 3rd party software ###"
89 echo "### Building BennuGD Core ###"
94 .
/configure
--prefix=${PREFIX} --target=${TARGET} --host=${HOST} --build=${BUILD} --enable-shared PKG_CONFIG_LIBDIR=${PKG_CONFIG_PATH} && make clean
&& make
101 if [ $?
-ne 0 ]; then
107 echo "### Building BennuGD Modules ###"
112 .
/configure
--prefix=${PREFIX} --target=${TARGET} --host=${HOST} --build=${BUILD} --enable-shared PKG_CONFIG_LIBDIR=${PKG_CONFIG_PATH} && make clean
&& make
119 if [ $?
-ne 0 ]; then
125 echo "### Building BennuGD Tools ###"
130 .
/configure
--prefix=${PREFIX} --target=${TARGET} --host=${HOST} --build=${BUILD} --enable-shared PKG_CONFIG_LIBDIR=${PKG_CONFIG_PATH} && make clean
&& make
137 if [ $?
-ne 0 ]; then
143 echo "### Copying files to bin folder ###"
145 mkdir
-p bin
/$TARGET 2>/dev
/null
146 cp 3rdparty
/des-4.04b
/libdes.so bin
/$TARGET
147 cp core
/bgdi
/src
/.libs
/bgdi bin
/$TARGET
148 cp core
/bgdc
/src
/bgdc bin
/$TARGET
149 cp core
/bgdrtm
/src
/.libs
/libbgdrtm.so bin
/$TARGET
150 cp $
(find modules
-name '*.so') bin
/$TARGET
151 cp tools
/moddesc
/moddesc bin
/$TARGET
153 echo "### Build done! ###"