summaryrefslogtreecommitdiffstats
path: root/progs/SConstruct
blob: ac5314fac57b7a3b6b9083cd5a52ec5d89b5a30e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import os
import os.path
import sys

env = Environment(
    tools = ['generic'],
    toolpath = ['../scons'],
    ENV = os.environ,
)


# Use Mesa's headers and libs
if 0:
    env.Append(CPPPATH = ['#../include'])
    env.Append(LIBPATH = ['#../lib'])


conf = Configure(env)

# OpenGL
if env['platform'] == 'windows':
    env.Prepend(LIBS = ['glu32', 'opengl32'])
else:
    env.Prepend(LIBS = ['GLU', 'GL'])

# Glut
env['GLUT'] = False
if conf.CheckCHeader('GL/glut.h'):
    if env['platform'] == 'windows':
        env['GLUT_LIB'] = 'glut32'
    else:
        env['GLUT_LIB'] = 'glut'
    env['GLUT'] = True

conf.Finish()


Export('env')

SConscript(
    'SConscript',
    duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
)