forked from monome/norns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwscript
72 lines (62 loc) · 2.6 KB
/
wscript
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
top = '.'
out = 'build'
def get_version_hash():
import subprocess
try:
return subprocess.check_output([
'git', 'rev-parse', '--verify', '--short', 'HEAD'
]).decode().strip()
except subprocess.CalledProcessError:
return ''
def options(opt):
opt.load('compiler_c compiler_cxx boost')
opt.add_option('--desktop', action='store_true', default=False)
def configure(conf):
conf.load('compiler_c compiler_cxx boost')
conf.define('VERSION_MAJOR', 0)
conf.define('VERSION_MINOR', 0)
conf.define('VERSION_PATCH', 0)
conf.define('VERSION_HASH', get_version_hash())
conf.env.append_unique('CFLAGS', ['-std=gnu11', '-Wall', '-Wextra', '-Werror'])
conf.env.append_unique('CFLAGS', ['-g'])
conf.env.append_unique('CXXFLAGS', ['-std=c++11'])
conf.define('_GNU_SOURCE', 1)
conf.check_cfg(package='alsa', args=['--cflags', '--libs'])
conf.check_cfg(package='libudev', args=['--cflags', '--libs'])
conf.check_cfg(package='libevdev', args=['--cflags', '--libs'])
conf.check_cfg(package='liblo', args=['--cflags', '--libs'])
conf.check_cfg(package='cairo', args=['--cflags', '--libs'])
conf.check_cfg(package='cairo-ft', args=['--cflags', '--libs'])
conf.check_cfg(package='lua53', args=['--cflags', '--libs'])
conf.check_cfg(package='nanomsg', args=['--cflags', '--libs'])
conf.check_cfg(package='avahi-compat-libdns_sd', args=['--cflags', '--libs'])
conf.check_cfg(package='sndfile', args=['--cflags', '--libs'])
conf.check_cc(msg='Checking for libmonome',
define_name='HAVE_LIBMONOME',
mandatory=True,
lib='monome',
header_name='monome.h',
uselib_store='LIBMONOME')
conf.check_cxx(msg='Checking for supercollider',
define_name='HAVE_SUPERCOLLIDER',
mandatory=True,
includes=[
'{}/include/SuperCollider/plugin_interface'.format(conf.env.PREFIX),
'{}/include/SuperCollider/common'.format(conf.env.PREFIX),
'/usr/include/SuperCollider/plugin_interface',
'/usr/include/SuperCollider/common',
'/usr/local/include/SuperCollider/plugin_interface',
'/usr/local/include/SuperCollider/common',
'/sc/external_libraries/nova-simd'
],
header_name='SC_PlugIn.h',
uselib_store='SUPERCOLLIDER')
conf.check_boost()
if conf.options.desktop:
conf.check_cfg(package='sdl2', args=['--cflags', '--libs'])
conf.define('NORNS_DESKTOP', True)
def build(bld):
bld.recurse('matron')
bld.recurse('ws-wrapper')
bld.recurse('sc')
bld.recurse('crone')