buildit.sh 810 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. expat_dir="./expat-2.0.1/"
  3. common_stuff="../commhub/commhub.c ../commhub/client_utils.c ../common/common_defs.c"
  4. video_stuff="fbutil.c smallfont.c medfont.c bigfont.c"
  5. xml_stuff="${expat_dir}.libs/libexpat.a"
  6. if grep -q "CC = $target_cc" ${expat_dir}Makefile; then
  7. echo "Expat already configured for our target."
  8. (cd $expat_dir; make)
  9. else
  10. echo "Expat must be re-configured to use $target_cc";
  11. tgtflag=`echo $target_cc | sed -r "s/-?gcc//" | tr -d "\n"`
  12. if [ -n "$tgtflag" ]; then tgtflag="--host $tgtflag"; fi
  13. (cd $expat_dir; ./configure $tgtflag; make clean; make)
  14. fi
  15. rm -f diu_minder
  16. $target_cc $target_ccopts -o diu_minder -lcrypto diu_main.c menu.c mkgmtime.c $common_stuff $video_stuff $xml_stuff
  17. rm -f showmessage
  18. $target_cc $target_ccopts -o showmessage showmessage.c $video_stuff