-
Notifications
You must be signed in to change notification settings - Fork 15
/
wscript
52 lines (37 loc) · 1.21 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
#!/usr/bin/env python
# encoding: utf-8
import sys
sys.path.insert(0, './waf_tools')
import os
import glob
VERSION = '0.0.2'
APPNAME = 'dynamixel-demos'
srcdir = '.'
blddir = 'build'
def options(opt):
opt.load('compiler_cxx')
opt.add_option('--tests', action='store_true', help='compile tests or not', dest='tests')
opt.recurse('src/tools')
# opt.recurse('src/tests')
def configure(conf):
conf.load('compiler_cxx')
conf.env['CXXFLAGS'] = '-D_REENTRANT -Wall -finline-functions -Wno-inline -fPIC -O3 -std=c++11 -ftemplate-depth-128 -Wno-sign-compare'.split(' ')
conf.recurse('src/tools')
# conf.recurse('src/tests')
print 'CXXFLAGS:' + str(conf.env['CXXFLAGS'])
def build(bld):
bld.recurse('src/demos')
bld.recurse('src/tools')
if bld.options.tests:
bld.recurse('src/tests')
p = bld.srcnode.abspath() + '/src/dynamixel/'
r = glob.glob(p + '*/**')
for i in r:
k = os.path.split(i)
d = os.path.split(k[0])
bld.install_files('${PREFIX}/include/dynamixel/' + d[1], i)
r = glob.glob(p + '*.hpp')
for i in r:
k = os.path.split(i)
d = os.path.split(k[0])
bld.install_files('${PREFIX}/include/' + d[1], i)