First commit of LuaGame with an OpenGL backend.
[luagame.git] / SConstruct
blobaec285cca0220f7b1546247c4042effcb34b47c8
1 env = Environment(CCFLAGS='-O2')
3 if not env.GetOption('clean'):
4 conf = Configure(env)
5 if not conf.CheckLib('lua'):
6 print 'ERROR: lua is not installed, exiting.'
7 Exit(1)
8 if not conf.CheckCXXHeader('lua.hpp'):
9 print 'ERROR: lua.hpp is missing, exiting.'
10 Exit(1)
11 if not conf.CheckLib('GL'):
12 print 'ERROR: OpenGL is not installed, exiting.'
13 Exit(1)
14 if not conf.CheckLib('GLU'):
15 print 'ERROR: GLU is not installed, exiting.'
16 Exit(1)
17 if not conf.CheckLib('SDL'):
18 print 'ERROR: SDL is not installed, exiting.'
19 Exit(1)
20 if not conf.CheckLib('SDL_image'):
21 print 'ERROR: SDL_image is not installed, exiting.'
22 Exit(1)
23 if not conf.CheckLib('SDL_mixer'):
24 print 'ERROR: SDL_mixer is not installed, exiting.'
25 Exit(1)
26 if not conf.CheckLib('SDL_ttf'):
27 print 'ERROR: SDL_ttf is not installed, exiting.'
28 Exit(1)
29 env = conf.Finish()
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')