You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

84 lines
2.7 KiB

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