1 env
= Environment(CCFLAGS
='-O2')
3 if not env
.GetOption('clean'):
5 if not conf
.CheckLib('lua'):
6 print 'ERROR: lua is not installed, exiting.'
8 if not conf
.CheckCXXHeader('lua.hpp'):
9 print 'ERROR: lua.hpp is missing, exiting.'
11 if not conf
.CheckLib('GL'):
12 print 'ERROR: OpenGL is not installed, exiting.'
14 if not conf
.CheckLib('GLU'):
15 print 'ERROR: GLU is not installed, exiting.'
17 if not conf
.CheckLib('SDL'):
18 print 'ERROR: SDL is not installed, exiting.'
20 if not conf
.CheckLib('SDL_image'):
21 print 'ERROR: SDL_image is not installed, exiting.'
23 if not conf
.CheckLib('SDL_mixer'):
24 print 'ERROR: SDL_mixer is not installed, exiting.'
26 if not conf
.CheckLib('SDL_ttf'):
27 print 'ERROR: SDL_ttf is not installed, exiting.'
32 source_files
= ['main.cpp', 'funcs.cpp', 'funcs_font.cpp', 'funcs_draw.cpp', 'funcs_input.cpp', 'funcs_video.cpp', 'funcs_sound.cpp', 'globals.cpp']
33 libraries
= ['lua','GL','GLU','SDL','SDL_mixer','SDL_image', 'SDL_ttf']
35 luagame
= env
.Program('luagame', source_files
, LIBS
= libraries
)
37 env
.Install('/usr/bin', luagame
)
38 env
.Alias('install', '/usr/bin')