import os

sources = Split("""
	main.cpp
	Timer.cpp
""")

# Setup options
opts = Options()
opts.AddOptions(
	PathOption('extra_include_path', 'Additional include directory', '.'), 
	PathOption('extra_lib_path', 'Additional lib directory', '.'))

env = Environment(
	ENV = os.environ,
	LIBS = ['GL', 'GLU', 'SDL', 'SDLmain', 'opal-ode'], 
	options = opts
)

env.Append(CPPPATH = env['extra_include_path'], 
	LIBPATH = env['extra_lib_path'])

# Note: This doesn't seem to build on Win32.  Try the Visual Studio project file 
# or bug the developers to fix this SConstruct for Win32.
if env['PLATFORM'] == 'win32':
	env.Replace(LIBS = ['opengl32', 'glu32', 'SDL', 'SDLmain', 'opal-ode'])

# Generate command line help text
env.Help(opts.GenerateHelpText(env))

# Build the executable.
exe = env.Program('simple', sources)

# Install the executable.
inst = env.Install('../bin/release', exe)

# Tell scons to build and install the executable by default.
env.Default(exe)
env.Default(inst)

