build-simulavr 827 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/bash
  2. # http://reprap.org/wiki/SimulAVR
  3. # (because I can't get the official SimulAVR at savannah to build a working executable)
  4. # Stop on errors
  5. set -e
  6. if [ ! -f .prereq ];then ./prerequise.sh;fi
  7. source avr-file-names
  8. TIME_START=$(date +%s)
  9. echo "Downloading sources..."
  10. wget -c http://wareck.free.fr/cross_compilation/avr_toolchain/simulavr.tar.xz
  11. tar xfJ simulavr.tar.xz
  12. # Make simulavr
  13. echo "Making simulavr in $NAME_SIMULAVR..."
  14. cd $NAME_SIMULAVR/
  15. git checkout traumflug
  16. cp ../pack/simulavr_patch1.patch .
  17. cp ../pack/simulavr_patch2.patch .
  18. patch -p1 < simulavr_patch1.patch
  19. patch -p1 < simulavr_patch2.patch
  20. ./bootstrap
  21. ./configure --enable-tcl --prefix=$PREFIX
  22. make
  23. sudo make install-strip
  24. cd ..
  25. TIME_END=$(date +%s)
  26. TIME_RUN=$(($TIME_END - $TIME_START))
  27. echo ""
  28. echo "Done in $TIME_RUN seconds"
  29. exit 0