José Fonseca | 72ebf4f | 2008-11-21 03:40:48 +0900 | [diff] [blame^] | 1 | import os |
| 2 | import os.path |
| 3 | import sys |
| 4 | |
| 5 | env = Environment( |
| 6 | tools = ['generic'], |
| 7 | toolpath = ['../scons'], |
| 8 | ENV = os.environ, |
| 9 | ) |
| 10 | |
| 11 | |
| 12 | # Use Mesa's headers and libs |
| 13 | if 0: |
| 14 | env.Append(CPPPATH = ['#../include']) |
| 15 | env.Append(LIBPATH = ['#../lib']) |
| 16 | |
| 17 | |
| 18 | conf = Configure(env) |
| 19 | |
| 20 | # OpenGL |
| 21 | if env['platform'] == 'windows': |
| 22 | env.Prepend(LIBS = ['glu32', 'opengl32']) |
| 23 | else: |
| 24 | env.Prepend(LIBS = ['GLU', 'GL']) |
| 25 | |
| 26 | # Glut |
| 27 | env['GLUT'] = False |
| 28 | if conf.CheckCHeader('GL/glut.h'): |
| 29 | if env['platform'] == 'windows': |
| 30 | env['GLUT_LIB'] = 'glut32' |
| 31 | else: |
| 32 | env['GLUT_LIB'] = 'glut' |
| 33 | env['GLUT'] = True |
| 34 | |
| 35 | conf.Finish() |
| 36 | |
| 37 | |
| 38 | Export('env') |
| 39 | |
| 40 | SConscript( |
| 41 | 'SConscript', |
| 42 | duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html |
| 43 | ) |