forked from kfish/liboggz
-
Notifications
You must be signed in to change notification settings - Fork 4
/
SConstruct
42 lines (32 loc) · 1.04 KB
/
SConstruct
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
import sys
# import Test()
SConscript(['scons/SConsTest'])
Import('enable_test')
my_cppdefines = {}
# Check endianness
if sys.byteorder == "big":
print "Host is big endian"
my_cppdefines['WORDS_BIGENDIAN'] = 1
else:
print "Host is little endian"
opts = Options()
opts.Add(BoolOption('enable_read', 'Set to 0 to disable reading support', 1))
my_cppdefines['OGGZ_CONFIG_READ'] = '${enable_read}'
opts.Add(BoolOption('enable_write', 'Set to 0 to disable writing support', 1))
my_cppdefines['OGGZ_CONFIG_WRITE'] = '${enable_write}'
libenv = Environment(options = opts,
CPPPATH = '#/scons',
CPPDEFINES = my_cppdefines)
Export('libenv')
progenv = libenv.Copy()
progenv.Append(LIBS = ['oggz', 'ogg'])
progenv.Append(LIBPATH = '../liboggz')
progenv.Dictionary('ENV')['LD_LIBRARY_PATH'] = './src/liboggz/'
enable_test (progenv)
Export('progenv')
dict = libenv.Dictionary()
enable_read = dict['enable_read']
Export('enable_read')
enable_write = dict['enable_write']
Export('enable_write')
SConscript(['src/SConscript'])