minor SConscript tweaking pyrit
authorRadek Brich <radek.brich@devl.cz>
Wed, 09 Apr 2008 00:29:11 +0200
branchpyrit
changeset 61 7006036eb0db
parent 60 a23b5089b9c3
child 62 07c2f8084719
minor SConscript tweaking
SConstruct
ccdemos/SConscript
src/SConscript
--- a/SConstruct	Tue Apr 08 01:05:12 2008 +0200
+++ b/SConstruct	Wed Apr 09 00:29:11 2008 +0200
@@ -6,7 +6,7 @@
 
 # float: -fsingle-precision-constant
 # double: -DPYRIT_DOUBLE
-(objs,pymodule) = SConscript('src/SConscript', build_dir='build/lib', duplicate=0)
+(lib, pymodule) = SConscript('src/SConscript', build_dir='build/lib', duplicate=0)
 
-SConscript('ccdemos/SConscript', build_dir='build/ccdemos', duplicate=0, exports='objs')
+SConscript('ccdemos/SConscript', build_dir='build/ccdemos', duplicate=0, exports='lib')
 SConscript('demos/SConscript', build_dir='build/demos', exports='pymodule')
--- a/ccdemos/SConscript	Tue Apr 08 01:05:12 2008 +0200
+++ b/ccdemos/SConscript	Wed Apr 09 00:29:11 2008 +0200
@@ -1,6 +1,6 @@
-Import('objs')
+Import('lib')
 
-env = Environment(CPPPATH = ['.','#include'])
+env = Environment(CPPPATH = ['.','#include'], LIBPATH='#build/lib', LIBS='pyrit')
 
 import os
 SDL_CCFLAGS = os.popen('sdl-config --cflags').read()
@@ -9,8 +9,8 @@
 sdlenv.Append(LINKFLAGS=SDL_LDFLAGS, CCFLAGS=SDL_CCFLAGS)
 
 image_obj = env.Object('image.c', CC="$CXX")
-sdlenv.Program(['realtime.cc']+objs)
-sdlenv.Program(['realtime_bunny.cc']+objs)
-sdlenv.Program(['realtime_dragon.cc']+objs)
-sdlenv.Program(['spheres_shadow.cc']+objs+image_obj, LIBS="png")
-sdlenv.Program(['textures.cc']+objs+image_obj, LIBS="png")
+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")
--- a/src/SConscript	Tue Apr 08 01:05:12 2008 +0200
+++ b/src/SConscript	Wed Apr 09 00:29:11 2008 +0200
@@ -22,4 +22,6 @@
 	SHLIBPREFIX = '',
 	CCFLAGS = '$CCFLAGS -Wno-write-strings')
 
-Return('objs pymodule')
+lib = env.StaticLibrary('pyrit', objs)
+
+Return('lib pymodule')