-
Notifications
You must be signed in to change notification settings - Fork 9
/
wscript
112 lines (80 loc) · 1.7 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/usr/bin/env python
import time
import sys
top = "."
out = "build"
# change this stuff
APPNAME = "rove"
VERSION = "0.2"
#
# dep checking functions
#
def check_jack(conf):
conf.check_cc(
mandatory=True,
execute=True,
lib="jack",
header_name="jack/jack.h",
uselib_store="JACK",
msg="Checking for JACK")
def check_libmonome(conf):
conf.check_cc(
mandatory=True,
execute=True,
lib="monome",
header_name="monome.h",
uselib_store="LIBMONOME",
msg="Checking for libmonome")
def check_sndfile(conf):
conf.check_cc(
mandatory=True,
execute=True,
lib="sndfile",
header_name="sndfile.h",
uselib_store="SNDFILE",
msg="Checking for libsndfile")
def check_samplerate(conf):
conf.check_cc(
define_name="HAVE_SRC",
mandatory=False,
quote=0,
execute=True,
lib="samplerate",
header_name="samplerate.h",
uselib_store="SAMPLERATE",
msg="Checking for libsamplerate")
#
# waf stuff
#
def options(opt):
opt.load("compiler_c")
def configure(conf):
# just for output prettifying
# print() (as a function) ddoesn't work on python <2.7
separator = lambda: sys.stdout.write("\n")
separator()
conf.load("compiler_c")
conf.load("gnu_dirs")
#
# conf checks
#
separator()
check_libmonome(conf)
check_jack(conf)
check_sndfile(conf)
check_samplerate(conf)
separator()
#
# setting defines, etc
#
conf.env.append_unique("CFLAGS", ["-std=c99", "-Wall", "-Werror", "-D_GNU_SOURCE"])
def build(bld):
bld.recurse("src")
def dist(dst):
pats = [".git*", "**/.git*", ".travis.yml"]
with open(".gitignore") as gitignore:
for l in gitignore.readlines():
if l[0] == "#":
continue
pats.append(l.rstrip("\n"))
dst.excl = " ".join(pats)