--- a/ccdemos/SConscript Wed Apr 09 11:35:59 2008 +0200
+++ b/ccdemos/SConscript Wed Apr 09 16:51:14 2008 +0200
@@ -1,6 +1,5 @@
-Import('lib')
-
-env = Environment(CPPPATH = ['.','#include'], LIBPATH='#build/lib', LIBS='pyrit')
+Import('env lib')
+env.Append(CPPPATH = ['.','#include'], LIBPATH='#build/lib', LIBS='pyrit')
import os
SDL_CCFLAGS = os.popen('sdl-config --cflags').read()
@@ -8,9 +7,13 @@
sdlenv = env.Clone()
sdlenv.Append(LINKFLAGS=SDL_LDFLAGS, CCFLAGS=SDL_CCFLAGS)
+l = []
image_obj = env.Object('image.c', CC="$CXX")
-sdlenv.Program(['realtime.cc'])
-sdlenv.Program(['realtime_bunny.cc'])
-sdlenv.Program(['realtime_dragon.cc'])
-sdlenv.Program(['spheres_shadow.cc']+image_obj, LIBS="$LIBS:png")
-sdlenv.Program(['textures.cc']+image_obj, LIBS="$LIBS:png")
+l.append( image_obj )
+l.append( sdlenv.Program(['realtime.cc']) )
+l.append( sdlenv.Program(['realtime_bunny.cc']) )
+l.append( sdlenv.Program(['realtime_dragon.cc']) )
+l.append( sdlenv.Program(['spheres_shadow.cc']+image_obj, LIBS="$LIBS:png") )
+l.append( sdlenv.Program(['textures.cc']+image_obj, LIBS="$LIBS:png") )
+
+env.Alias('cc-demos', l)