3 ## -- OPEN2X USER SETTINGS
5 ## OPEN2X - This should point to the root of your tool-chain {i.e. folder above the BIN dir}
7 OPEN2X
=/opt
/openwiz
/arm-openwiz-linux-gnu
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-open2x-linux' for a normal Open2x tool-chain.
13 HOST
=arm-openwiz-linux-gnu
14 TARGET
=arm-openwiz-linux-gnu
16 PKG_CONFIG_PATH
=/opt
/openwiz
/arm-openwiz-linux-gnu
/lib
/pkgconfig
18 ## -- END OPEN2X USER SETTINGS
23 export PKG_CONFIG_PATH
28 PATH
=$PATH:$OPEN2X/bin
31 #ln -s `whereis -b pkg-config | sed 's/pkg-config\: //g'` /opt/openwiz/arm-openwiz-linux-gnu/bin/pkg-config
33 # Do not edit below here
34 CC
="${OPEN2X}/bin/${HOST}-gcc"
35 CXX
="${OPEN2X}/bin/${HOST}-g++"
36 AR
="${OPEN2X}/bin/${HOST}-ar"
37 STRIP
="${OPEN2X}/bin/${HOST}-strip"
38 RANLIB
="${OPEN2X}/bin/${HOST}-ranlib"
40 CFLAGS
="-DTARGET_GP2X_WIZ -O2 -ffast-math -fomit-frame-pointer -mcpu=arm920t -DARM -D_ARM_ASSEM_ -I${OPEN2X}/include -I${OPEN2X}/include/libxml2 -I${OPEN2X}/include/SDL"
41 LDFLAGS
="-L${OPEN2X}/lib"
42 #PKG_CONFIG="${OPEN2X}/bin/pkg-config"
53 echo Current settings.
55 echo Install root
/Working dir
= $OPEN2X
56 echo Tool locations
= $OPEN2X/bin
57 echo Host
/Target
= $HOST / $TARGET
67 echo LDFLAGS
= $LDFLAGS
68 echo PKG_CONFIG
= $PKG_CONFIG
70 echo "### Building 3rd party software ###"
87 echo "### Building BennuGD Core ###"
92 .
/configure
--prefix=${PREFIX} --target=${TARGET} --host=${HOST} --build=${BUILD} --enable-shared PKG_CONFIG_LIBDIR=${PKG_CONFIG_PATH} && make clean
&& make
105 echo "### Building BennuGD Modules ###"
110 .
/configure
--prefix=${PREFIX} --target=${TARGET} --host=${HOST} --build=${BUILD} --enable-shared PKG_CONFIG_LIBDIR=${PKG_CONFIG_PATH} && make clean
&& make
117 if [ $?
-ne 0 ]; then
123 echo "### Building BennuGD Tools ###"
128 .
/configure
--prefix=${PREFIX} --target=${TARGET} --host=${HOST} --build=${BUILD} --enable-shared PKG_CONFIG_LIBDIR=${PKG_CONFIG_PATH} && make clean
&& make
135 if [ $?
-ne 0 ]; then
141 echo "### Copying files to bin folder ###"
143 mkdir
-p bin
/$TARGET 2>/dev
/null
144 cp 3rdparty
/des-4.04b
/libdes.so bin
/$TARGET
145 cp core
/bgdi
/src
/.libs
/bgdi bin
/$TARGET
146 cp core
/bgdc
/src
/bgdc bin
/$TARGET
147 cp core
/bgdrtm
/src
/.libs
/libbgdrtm.so bin
/$TARGET
148 cp $
(find modules
-name '*.so') bin
/$TARGET
149 cp tools
/moddesc
/moddesc bin
/$TARGET
151 echo "### Build done! ###"