-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwscript
105 lines (89 loc) · 4.31 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
#! /usr/bin/env python
# encoding: utf-8
# the following two variables are used by the target "waf dist"
VERSION='0.0.1'
APPNAME='bitvis'
# these variables are mandatory ('/' are converted automatically)
top = '.'
out = 'build'
def options(opt):
opt.load('compiler_cxx')
opt.add_option('--disable-vlc', action='store_true', default=False, help='disable libvlc')
def configure(conf):
conf.load('compiler_cxx')
conf.env.DISABLE_VLC=conf.options.disable_vlc
conf.check(header_name='jack/jack.h')
conf.check(header_name='fftw3.h')
conf.check(header_name='samplerate.h')
conf.check(header_name='sys/ipc.h')
conf.check(header_name='sys/shm.h')
conf.check(header_name='uriparser/Uri.h')
if not conf.options.disable_vlc:
conf.check(header_name='vlc/vlc.h')
conf.check(header_name='X11/Xlib.h', auto_add_header_name=True)
conf.check(header_name='X11/extensions/Xrender.h')
conf.check(header_name='X11/extensions/XShm.h')
conf.check(lib='fftw3', uselib_store='fftw3')
conf.check(lib='fftw3f', uselib_store='fftw3f')
conf.check(lib='jack', uselib_store='jack')
conf.check(lib='samplerate', uselib_store='samplerate')
conf.check(lib='X11', uselib_store='X11')
conf.check(lib='Xext', uselib_store='Xext')
conf.check(lib='Xrender', uselib_store='Xrender')
conf.check(lib='uriparser', uselib_store='uriparser')
conf.check(lib='m', uselib_store='m', mandatory=False)
conf.check(lib='pthread', uselib_store='pthread', mandatory=False)
if not conf.options.disable_vlc:
conf.check(lib='vlc', uselib_store='vlc')
conf.check(function_name='clock_gettime', header_name='time.h', mandatory=False)
conf.check(function_name='clock_gettime', header_name='time.h', lib='rt', uselib_store='rt', mandatory=False,
msg='Checking for clock_gettime in librt')
conf.write_config_header('config.h')
def build(bld):
bld.program(source='src/bitvis/main.cpp\
src/bitvis/bitvis.cpp\
src/bitvis/jackclient.cpp\
src/bitvis/mpdclient.cpp\
src/bitvis/fft.cpp\
src/util/debugwindow.cpp\
src/util/log.cpp\
src/util/misc.cpp\
src/util/mutex.cpp\
src/util/timeutils.cpp\
src/util/condition.cpp\
src/util/tcpsocket.cpp\
src/util/thread.cpp',
use=['m','pthread','rt', 'jack', 'fftw3', 'fftw3f', 'samplerate', 'uriparser', 'X11', 'Xrender'],
includes='./src',
cxxflags='-Wall -g -DUTILNAMESPACE=BitVisUtil -Ofast -flto -funroll-loops -funswitch-loops -fmodulo-sched -fmodulo-sched-allow-regmoves -funsafe-loop-optimizations -ftracer -fivopts -ftree-loop-ivcanon -ftree-loop-im -ftree-loop-distribution -floop-parallelize-all -floop-block -floop-strip-mine -floop-interchange -fassociative-math -freciprocal-math -fno-trapping-math -fno-signed-zeros -march=native',
ldflags='-flto',
target='bitvis')
bld.program(source='src/bitx11/main.cpp\
src/bitx11/bitx11.cpp\
src/util/debugwindow.cpp\
src/util/log.cpp\
src/util/misc.cpp\
src/util/mutex.cpp\
src/util/timeutils.cpp\
src/util/condition.cpp\
src/util/tcpsocket.cpp\
src/util/thread.cpp',
use=['m', 'rt', 'X11', 'Xrender', 'Xext', 'pthread'],
includes='./src',
cxxflags='-Wall -g -DUTILNAMESPACE=BitX11Util',
target='bitx11')
if not bld.env.DISABLE_VLC:
bld.program(source='src/bitvlc/main.cpp\
src/bitvlc/bitvlc.cpp\
src/util/condition.cpp\
src/util/debugwindow.cpp\
src/util/log.cpp\
src/util/misc.cpp\
src/util/mutex.cpp\
src/util/thread.cpp\
src/util/timeutils.cpp\
src/util/tcpsocket.cpp',
use=['m', 'rt', 'X11', 'Xrender', 'Xext', 'vlc', 'pthread'],
includes='./src',
cxxflags='-Wall -g -DUTILNAMESPACE=BitVlcUtil',
target='bitvlc')