nds.sh 861 B

12345678910111213141516171819202122232425262728293031323334353637
  1. platform_enter_hook() {
  2. pushd arch/nds >/dev/null
  3. unzip -qq $HOME/megazeux/scripts/deps/nds.zip
  4. popd >/dev/null
  5. export DEVKITPRO=$HOME/bin/devkitpro
  6. export DEVKITARM=$HOME/bin/devkitpro/devkitARM
  7. export PATH=$DEVKITARM/bin:$PATH
  8. BUILD_FLAGS="debuglink"
  9. CONFIG_FLAGS="$CONFIG_FLAGS --platform nds --prefix $DEVKITARM \
  10. --optimize-size --disable-editor --disable-helpsys \
  11. --disable-utils --disable-libpng --enable-meter"
  12. }
  13. platform_exit_hook() {
  14. rm -rf arch/nds/ndsLibfat arch/nds/ndsDebug
  15. rm -rf arch/nds/ndsScreens/build arch/nds/ndsScreens/lib
  16. }
  17. platform_build_test_hook() {
  18. if [ ! -f mzxrun ]; then
  19. ERRNO=1
  20. return
  21. fi
  22. file mzxrun | egrep -q "ELF 32-bit.*LSB.*ARM.*statically"
  23. if [ "$?" != "0" ]; then
  24. ERRNO=1
  25. return
  26. fi
  27. }
  28. platform_archive_test_hook() {
  29. [ ! -f build/dist/nds/*nds.zip ] && ERRNO=2
  30. }