Import('package_version')

env = Environment(PATH="/home/ingo/projects/mingw32/run/bin:$PATH",
                  PKG_CONFIG_LIBDIR="/home/ingo/projects/mingw32/run/lib/pkgconfig:/home/ingo/projects/mingw32/run/opt/gtk/lib/pkgconfig",
                  CXXFLAGS=["-O3", "-s", "-std=c++0x"],
                  CPPDEFINES=['HAVE_SDL', ('HAVE_OPENGL', 1)],
                  PROGSUFFIX = '.exe',
                  CXX='i586-mingw32msvc-c++',
                  AR='i586-mingw32msvc-ar',
                  RANLIB='i586-mingw32msvc-ranlib',
                  CPPPATH=['src/mingw32/',
                           'src/',
                           '/home/ingo/projects/mingw32/run/include',
                           '/home/ingo/projects/mingw32/run/opt/SDL-1.2.14/include/SDL',
                           '/home/ingo/projects/mingw32/run/opt/SDL_image-1.2.10/include',
                           '/home/ingo/projects/mingw32/run/opt/SDL_mixer-1.2.11/include',
                           '/home/ingo/projects/mingw32/run/opt/openal1.1/include',
                           '/home/ingo/projects/mingw32/run/opt/gtk/include' ],
                  LIBPATH = [ '/home/ingo/projects/mingw32/run/lib',
                              '/home/ingo/projects/mingw32/run/opt/SDL-1.2.14/lib',
                              '/home/ingo/projects/mingw32/run/opt/SDL_image-1.2.10/lib',
                              '/home/ingo/projects/mingw32/run/opt/SDL_mixer-1.2.11/lib',
                              '/home/ingo/projects/mingw32/run/opt/gtk/lib' ],
                  LINKFLAGS = [ '-mwindows' ],
                  LIBS = [ 'mingw32', 'SDLmain', "SDL", "SDL_mixer", "SDL_image", "boost_signals", "png",
                           'opengl32', 'glu32' ])

pingus_sources = \
               Glob('external/tinygettext/tinygettext/*.cpp') + \
               Glob('src/*.cpp') + \
               Glob('src/editor/*.cpp') + \
               Glob('src/engine/display/*.cpp') + \
               Glob('src/engine/display/delta/*.cpp') + \
               Glob('src/engine/display/opengl/*.cpp') + \
               Glob('src/engine/gui/*.cpp') + \
               Glob('src/engine/input/*.cpp') + \
               Glob('src/engine/resource/*.cpp') + \
               Glob('src/engine/screen/*.cpp') + \
               Glob('src/engine/sound/*.cpp') + \
               Glob('src/engine/system/*.cpp') + \
               Glob('src/lisp/*.cpp') + \
               Glob('src/math/*.cpp') + \
               Glob('src/pingus/*.cpp') + \
               Glob('src/pingus/actions/*.cpp') + \
               Glob('src/pingus/colliders/*.cpp') + \
               Glob('src/pingus/components/*.cpp') + \
               Glob('src/pingus/movers/*.cpp') + \
               Glob('src/pingus/particles/*.cpp') + \
               Glob('src/pingus/screens/*.cpp') + \
               Glob('src/pingus/worldmap/*.cpp') + \
               Glob('src/pingus/worldobjs/*.cpp') + \
               Glob('src/util/*.cpp') + \
               Glob('src/win32/*.cpp')

pingus_res = Command('src/win32/pingus.o', 'src/win32/pingus.rc',
                     'i586-mingw32msvc-windres $SOURCE $TARGET')

env.Append(CPPDEFINES = ['WIN32', ('VERSION', '"\\"%s\\""' % package_version)])
env.Append(CPPPATH=['external/tinygettext'])
env.Program("pingus", pingus_sources + pingus_res)

# EOF #
