1 Import('env lib') |
1 Import('env lib') |
2 env.Append(CPPPATH = ['.','#include'], LIBPATH='#build/lib', LIBS='pyrit') |
2 env.Append(CPPPATH = ['.','#include'], LIBPATH='#build/lib') |
|
3 env.Prepend(LIBS=['pyrit','png']) |
3 |
4 |
4 import os |
|
5 SDL_CCFLAGS = os.popen('sdl-config --cflags').read() |
|
6 SDL_LDFLAGS = os.popen('sdl-config --libs').read() |
|
7 sdlenv = env.Clone() |
5 sdlenv = env.Clone() |
8 sdlenv.Append(LINKFLAGS=SDL_LDFLAGS, CCFLAGS=SDL_CCFLAGS) |
6 sdlenv.ParseConfig('sh sdl-config --cflags --libs') |
9 |
7 |
10 l = [] |
8 l = [] |
11 image_obj = env.Object('image.c', CC="$CXX") |
9 image_obj = env.Object('image.c', CC="$CXX") |
12 l.append( image_obj ) |
10 l.append( image_obj ) |
13 l.append( sdlenv.Program(['realtime.cc']) ) |
11 l.append( sdlenv.Program(['realtime.cc']) ) |
14 l.append( sdlenv.Program(['realtime_bunny.cc']) ) |
12 l.append( sdlenv.Program(['realtime_bunny.cc']) ) |
15 l.append( sdlenv.Program(['realtime_dragon.cc']) ) |
13 l.append( sdlenv.Program(['realtime_dragon.cc']) ) |
16 l.append( sdlenv.Program(['spheres_shadow.cc']+image_obj, LIBS="$LIBS:png") ) |
14 l.append( sdlenv.Program(['spheres_shadow.cc']+image_obj) ) |
17 l.append( sdlenv.Program(['textures.cc']+image_obj, LIBS="$LIBS:png") ) |
15 l.append( sdlenv.Program(['textures.cc']+image_obj) ) |
18 |
16 |
19 env.Alias('cc-demos', l) |
17 env.Alias('cc-demos', l) |