-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathwscript
More file actions
29 lines (24 loc) · 778 Bytes
/
wscript
File metadata and controls
29 lines (24 loc) · 778 Bytes
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
import Options, Utils, sys
from os import unlink, symlink, popen
from os.path import exists, islink
srcdir = '.'
blddir = 'build'
VERSION = '0.0.1'
def set_options(ctx):
ctx.tool_options('compiler_cxx')
def configure(ctx):
ctx.check_tool('compiler_cxx')
ctx.check_tool('node_addon')
def build(ctx):
t = ctx.new_task_gen('cxx', 'shlib', 'node_addon')
t.target = 'rsaBinding'
t.source = 'node_rsa.cc'
def shutdown():
t = 'rsaBinding.node'
if Options.commands['clean']:
if exists(t): unlink(t)
if Options.commands['build']:
if exists('build/default/' + t) and not exists(t):
symlink('build/default/' + t, t)
if exists('build/Release/' + t) and not exists(t):
symlink('build/Release/' + t, t)