sdl2-config 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/bin/sh
  2. prefix=/opt/local/x86_64-w64-mingw32
  3. exec_prefix=${prefix}
  4. exec_prefix_set=no
  5. libdir=${exec_prefix}/lib
  6. #usage="\
  7. #Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
  8. usage="\
  9. Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"
  10. if test $# -eq 0; then
  11. echo "${usage}" 1>&2
  12. exit 1
  13. fi
  14. while test $# -gt 0; do
  15. case "$1" in
  16. -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  17. *) optarg= ;;
  18. esac
  19. case $1 in
  20. --prefix=*)
  21. prefix=$optarg
  22. if test $exec_prefix_set = no ; then
  23. exec_prefix=$optarg
  24. fi
  25. ;;
  26. --prefix)
  27. echo $prefix
  28. ;;
  29. --exec-prefix=*)
  30. exec_prefix=$optarg
  31. exec_prefix_set=yes
  32. ;;
  33. --exec-prefix)
  34. echo $exec_prefix
  35. ;;
  36. --version)
  37. echo 2.0.10
  38. ;;
  39. --cflags)
  40. echo -I${prefix}/include/SDL2 -Dmain=SDL_main
  41. ;;
  42. --libs)
  43. echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows
  44. ;;
  45. --static-libs)
  46. # --libs|--static-libs)
  47. echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--no-undefined -Wl,--dynamicbase -Wl,--nxcompat -Wl,--high-entropy-va -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -static-libgcc
  48. ;;
  49. *)
  50. echo "${usage}" 1>&2
  51. exit 1
  52. ;;
  53. esac
  54. shift
  55. done