#!/usr/bin/python

import os

extra_cflags = '-Wall'
extra_ldflags = '-Wl,--export-all-symbols'
extra_cppflags = ''

if ARGUMENTS.get('debug', 0):
    extra_cflags += ' -g'
else:
    extra_cflags += '   '

if ARGUMENTS.get('noopt', 0):
    extra_cflags += ' -O0'
else:
    extra_cflags += ' -O3'

env = Environment(CFLAGS = extra_cflags, CPPFLAGS = extra_cppflags, LINKFLAGS = extra_ldflags, tools = ["mingw", "gcc"])

env.Help("""
Type: 'scons' to build the program,
'scons noopt=1' to build a non-optimized version.
'scons debug=1' to build a debug version.
'scons noopt=1 debug=1' to build a non-optimized debug version.
""")

env.ParseConfig ("pkg-config --cflags --libs glib-2.0")
env.ParseConfig ("pkg-config --cflags --libs gdk-pixbuf-2.0")
env.ParseConfig ("pkg-config --cflags --libs gtk+-2.0")
env.ParseConfig ("pkg-config --cflags --libs gdk-2.0")

main_target = "main"

main_sources = ["main.c"]

env.Program (target = main_target, source = main_sources)
