1 #!/bin/bash 2 3 PLATFORM=$1 4 5 if [ "-$PLATFORM" == "-" ]; then 6 PLATFORM=both 7 fi 8 9 function build 10 { 11 PLTM=$1 12 if [ "$PLTM" == "x86" ]; then 13 CC=/usr/bin/gcc 14 else 15 CC=/vobs/jem/cee4_lsp/mobilinux/devkit/arm/v6_vfp_le/bin/arm_v6_vfp_le-g++ 16 fi 17 18 #make clean 19 rm -rf plugins/$PLTM 20 rm -rf lib/$PLTM 21 rm -rf bin/$PLTM 22 #create subdirs 23 mkdir -p plugins/$PLTM 24 mkdir -p lib/$PLTM 25 mkdir -p bin/$PLTM 26 #make 27 CC_FLAGS="-fno-rtti -fno-exceptions -fPIC -g -DLOB_SUPPORT" 28 CC_LINKS="-L../lib/$PLTM.d -ldmnative -ldmssession -ldl -lpthread" 29 CC_INCLUDES="-I../include/ -I../portlib" 30 $CC -L./lib/$PLTM -o bin/$PLTM/testexe src/dmt_test.cc src/dmt_stress.cc $CC_LINKS $CC_INCLUDES $CC_FLAGS || exit 1 31 $CC -shared $CC_INCLUDES -o plugins/$PLTM/libmandatoryconstplugin.so src/plugin_dll_test_constraint.cc $CC_FLAGS $CC_LINKS || exit 32 $CC -shared $CC_INCLUDES -o plugins/$PLTM/libtestexecplugin.so src/plugin_dll_test_exec.cc $CC_FLAGS $CC_LINKS || exit 1 33 $CC -shared $CC_INCLUDES -o plugins/$PLTM/libtestrwplugin.so src/test_rwplugin.cc $CC_FLAGS $CC_LINKS || exit 1 34 $CC -shared $CC_INCLUDES -o plugins/$PLTM/libtestdataplugin.so src/plugin_dll_test_data.cc $CC_FLAGS $CC_LINKS || exit 1 35 $CC -shared $CC_INCLUDES -o plugins/$PLTM/libtestcommitplugin.so src/plugin_dll_test_commit.cc $CC_FLAGS $CC_LINKS || exit 1 36 37 #link file system plugin .so 38 pushd plugins/x86 39 ln -s ../../../lib/x86.d/libdmfsplugin.so libdmfsplugin.so 40 popd 41 42 cp -f settings/*.ini plugins/$PLTM 43 } 44 45 46 if [ "$PLATFORM" == "x86" ] || [ "$PLATFORM" == "both" ]; then 47 echo build unittest for x86... 48 build x86 49 fi 50 51 if [ "$PLATFORM" == "xscale" ] || [ "$PLATFORM" == "both" ]; then 52 echo build unitttest for xscale 53 build xscale 54 fi 55 56 # create sample tree 57 cd ../tools/dmt-tools 58 ./generateDMT $PWD/../../samples/settings/Dmt.zip || exit 1 59 cd ../../samples 60 mkdir -p dmt_data 61 cp -f ../tools/dmt-tools/treedata/* $PWD/dmt_data/ 62 cp -f ../tools/dmt-tools/fstab dmt_data/ 63