forked from OpenRTMFP/ArcusNode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wscript
executable file
·56 lines (45 loc) · 1.78 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
# wscript
#
# Copyright 2011 OpenRTMFP
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License received along this program for more
# details (or else see http://www.gnu.org/licenses/).
#
# Author: arcusdev <[email protected]>
#
# This file is a part of ArcusNode.
import os, sys
srcdir = '.'
blddir = './build'
VERSION = '0.0.4'
def set_options(opt):
opt.tool_options('compiler_cxx')
def configure(conf):
conf.check_tool('compiler_cxx')
conf.check_tool('node_addon')
def build(bld):
rtmfp = bld.new_task_gen('cxx', 'shlib', 'node_addon')
if sys.platform.startswith("cygwin"):
rtmfp.lib = 'crypto';
rtmfp.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall", "-L/usr/lib", "-lssl"]
rtmfp.chmod = 0755
rtmfp.target = 'rtmfp'
rtmfp.source = 'src/rtmfp.cc'
keyExchange = bld.new_task_gen('cxx', 'shlib', 'node_addon')
if sys.platform.startswith("cygwin"):
keyExchange.lib = 'crypto';
keyExchange.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall", "-L/usr/lib", "-lssl"]
keyExchange.chmod = 0755
keyExchange.target = 'keyexchange'
keyExchange.source = 'src/keyexchange.cc'
def clean(opt):
if os.path.exists(blddir + '/default/keyexchange.node'): os.unlink(blddir + '/default/keyexchange.node')
if os.path.exists(blddir + '/default/rtmfp.node'): os.unlink(blddir + '/default/rtmfp.node')