This repository was archived by the owner on Dec 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathSConstruct
More file actions
57 lines (40 loc) · 1.37 KB
/
SConstruct
File metadata and controls
57 lines (40 loc) · 1.37 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# -*- Mode: Python -*-
import morboutils
fw_env = Environment()
fw_env['CPPPATH'] = ["#include/"]
fw_env['CCFLAGS'] = "-Os -march=native -pipe -g "
fw_env['CXXFLAGS'] = "-std=c++0x"
fw_env['CFLAGS'] = "-std=c99 "
conf = Configure(fw_env, custom_tests = {'CheckPKGConfig' : morboutils.CheckPKGConfig,
'CheckPKG' : morboutils.CheckPKG })
if not conf.CheckPKGConfig('0.15.0'):
print('pkg-config >= 0.15.0 not found.')
Exit(1)
build_fw_scan = True
build_tools = True
if not conf.CheckPKG('libraw1394'):
print('Could not find libraw1394.')
build_tools = False
build_fw_scan = False
else:
conf.env.ParseConfig('pkg-config --cflags --libs libraw1394')
if build_fw_scan and not conf.CheckCHeader('slang.h'):
print('Could not find slang headers.')
build_fw_scan = False
else:
conf.env.Append(LIBS = ['slang'])
if build_fw_scan and not conf.CheckFunc('SLsmg_init_smg'):
print('Could not link to slang.')
build_fw_scan = False
if not build_fw_scan:
print('fw_scan will not be built.')
if not build_tools:
print('Firewire host tools will not be built.')
fw_env = conf.Finish()
Export('fw_env')
SConscript(["standalone/SConscript"])
if build_tools:
SConscript(["tools/SConscript"])
if build_fw_scan:
SConscript(["fw_scan/SConscript"])
# EOF