Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

build-mingw 2.5 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #!/bin/sh
  2. ## Native MinGW compilation for Lol Engine -- Sam Hocevar <sam@hocevar.net>
  3. # This can't hurt
  4. make distclean
  5. set -e
  6. PATH="$PATH:./contrib/gtk-2.22.1/bin"
  7. M4PATH="$M4PATH:./contrib/gtk-2.22.1/share/aclocal"
  8. export M4PATH # This looks necessary
  9. PKG_CONFIG_PATH="$PKG_CONFIG_PATH:`pwd`/contrib/gtkglarea-2.0.1/lib/pkgconfig"
  10. export PKG_CONFIG_PATH # This looks necessary, too
  11. # SDL include path
  12. CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/sdl-1.2.14/include"
  13. CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/sdl-image-1.2.10/include"
  14. CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/sdl-mixer-1.2.11/include"
  15. # Glew include path
  16. CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/glew-1.6.0/include -DGLEW_STATIC"
  17. # GTK include path
  18. CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/lib/glib-2.0/include"
  19. CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/lib/gtk-2.0/include"
  20. CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/include/glib-2.0"
  21. CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/include/gtk-2.0"
  22. CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/include/cairo"
  23. CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/include/pango-1.0"
  24. CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/include/gdk-pixbuf-2.0"
  25. CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/include/atk-1.0"
  26. CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtkglarea-2.0.1/include"
  27. # SDL library path
  28. LDFLAGS="$LDFLAGS -L`pwd`/contrib/sdl-1.2.14/lib"
  29. LDFLAGS="$LDFLAGS -L`pwd`/contrib/sdl-image-1.2.10/lib"
  30. LDFLAGS="$LDFLAGS -L`pwd`/contrib/sdl-mixer-1.2.11/lib"
  31. # Glew library path
  32. LDFLAGS="$LDFLAGS -L`pwd`/contrib/glew-1.6.0/lib"
  33. # GTK library path
  34. LDFLAGS="$LDFLAGS -L`pwd`/contrib/gtk-2.22.1/lib"
  35. LDFLAGS="$LDFLAGS -L`pwd`/contrib/gtk-2.22.1/bin"
  36. LDFLAGS="$LDFLAGS -L`pwd`/contrib/gtkglarea-2.0.1/lib"
  37. # Prevent issues with GTK+ internals
  38. CPPFLAGS="$CPPFLAGS -mms-bitfields"
  39. # We don't want our binaries to depend on MinGW
  40. LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++"
  41. # Help our build scripts a bit here
  42. GTK_LIBS="$GTK_LIBS -lgtkgl-2.0 -lopengl32 -lglew32 -lgdi32"
  43. GTK_LIBS="$GTK_LIBS -lgtk-win32-2.0 -lgdk-win32-2.0"
  44. GTK_LIBS="$GTK_LIBS -lglib-2.0 -lgthread-2.0 -lgobject-2.0"
  45. LOL_LIBS="$LOL_LIBS -lSDL_image -lSDL_mixer -lSDLmain -lSDL -lopengl32 -lglew32"
  46. # Bootstrap, configure and make
  47. ./bootstrap
  48. # Only on Windows
  49. if test "x${MSYSTEM}" != xMINGW32; then
  50. HOSTFLAGS=--host=i586-mingw32msvc
  51. BUILDFLAGS=--build=none
  52. fi
  53. ./configure $HOSTFLAGS $BUILDFLAGS \
  54. CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" \
  55. GTK_LIBS="$GTK_LIBS" LOL_LIBS="$LOL_LIBS"
  56. make -j6