supertux.sh 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/bash
  2. . `dirname "$0"`/common || exit 1
  3. SUPERTUX_DIR="$BASEDIR/../supertux"
  4. export CC="$COMPILER_PREFIX/bin/$TARGET-gcc"
  5. export CXX="$COMPILER_PREFIX/bin/$TARGET-g++"
  6. #export GCC_EXEC_PREFIX="$TARGET"
  7. export PKG_CONFIG_PATH="$COMPILER_PREFIX/lib/pkgconfig:$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
  8. CMAKE_FLAGS="-DDEBUG=on"
  9. INCLUDE2X="$PREFIX/include"
  10. INCLUDEL2X="$COMPILER_PREFIX/../usr/include"
  11. LIB2X="$PREFIX/lib"
  12. LIBL2X="$COMPILER_PREFIX/../usr/lib"
  13. CMAKE_FLAGS=""
  14. CMAKE_FLAGS="$CMAKE_FLAGS -DGENERATE_MESSAGESPOT=off"
  15. CMAKE_FLAGS="$CMAKE_FLAGS -DGENERATE_WRAPPER=off"
  16. CMAKE_FLAGS="$CMAKE_FLAGS -DPHYSFS_INCLUDE_DIR=$INCLUDE2X"
  17. CMAKE_FLAGS="$CMAKE_FLAGS -DPHYSFS_LIBRARY=$LIB2X/libphysfs.so"
  18. CMAKE_FLAGS="$CMAKE_FLAGS -DOPENAL_INCLUDE_DIR=$INCLUDE2X/AL"
  19. CMAKE_FLAGS="$CMAKE_FLAGS -DOPENAL_LIBRARY=$LIB2X/libopenal.so"
  20. CMAKE_FLAGS="$CMAKE_FLAGS -DSDL_INCLUDE_DIR=$INCLUDEL2X/SDL"
  21. CMAKE_FLAGS="$CMAKE_FLAGS -DSDL_LIBRARY=$LIBL2X/libSDL.so"
  22. CMAKE_FLAGS="$CMAKE_FLAGS -DSDLIMAGE_INCLUDE_DIR=$INCLUDEL2X/SDL"
  23. CMAKE_FLAGS="$CMAKE_FLAGS -DSDLIMAGE_LIBRARY=$LIBL2X/libSDL_image.so"
  24. CMAKE_FLAGS="$CMAKE_FLAGS -DVORBISENC_LIBRARY=$LIB2X/libvorbisenc.so"
  25. CMAKE_FLAGS="$CMAKE_FLAGS -DVORBISFILE_LIBRARY=$LIB2X/libvorbisfile.so"
  26. CMAKE_FLAGS="$CMAKE_FLAGS -DVORBIS_LIBRARY=$LIB2X/libvorbis.so"
  27. CMAKE_FLAGS="$CMAKE_FLAGS -DVORBIS_INCLUDE_DIR=$INCLUDEL2X"
  28. CMAKE_FLAGS="$CMAKE_FLAGS -DCMAKE_CXX_COMPILER=$CXX"
  29. CMAKE_FLAGS="$CMAKE_FLAGS -DCMAKE_C_COMPILER=$CC"
  30. CMAKE_FLAGS="$CMAKE_FLAGS -DVORBIS_INCLUDE_DIR=$INCLUDE2X"
  31. CMAKE_FLAGS="$CMAKE_FLAGS -DCURL_INCLUDE_DIR=$INCLUDE2X"
  32. CMAKE_FLAGS="$CMAKE_FLAGS -DCURL_LIBRARY=$LIB2X/libcurl.so"
  33. CFLAGS="-DGL_VERSION_ES_CM_1_0 -DLF1000 -Dlf_linux -I$INCLUDEL2X -I$INCLUDEL2X"
  34. CMAKE_FLAGS="$CMAKE_FLAGS -DCMAKE_CXX_FLAGS=$CFLAGS"
  35. CMAKE_FLAGS="$CMAKE_FLAGS -DCMAKE_C_FLAGS=$CFLAGS"
  36. execute mkdir -p supertux
  37. execute pushd ../supertux
  38. execute cmake "$CMAKE_FLAGS" "$SUPERTUX_DIR"
  39. execute make -j 2
  40. execute popd ../supertux