-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathwscript
51 lines (46 loc) · 1.1 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
#!/usr/bin/env python
srcdir = "."
blddir = "build"
VERSION = "0.0.1"
def set_options(opt):
opt.tool_options("compiler_cxx")
opt.tool_options("gcc")
def configure(conf):
conf.check_tool("compiler_cxx")
conf.check_tool("gcc")
conf.check_tool("node_addon")
def build(bld):
### scryptc
scryptc = bld.new_task_gen("cc")
scryptc.source = "deps/crypto/crypto_scrypt-nosse.c"
scryptc.includes = """
deps/
deps/crypto/
deps/util/
"""
scryptc.name = "scryptc"
scryptc.target = "scryptc"
scryptc.install_path = None
scryptc.cflags = ["-fPIC"]
sha256 = bld.new_task_gen("cc")
sha256.source = "deps/crypto/sha256scrypt.c"
sha256.includes = """
deps/
deps/crypto/
deps/util/
"""
sha256.name = "sha256"
sha256.target = "sha256"
sha256.install_path = None
sha256.cflags = ["-fPIC"]
obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
obj.add_objects = "scryptc sha256"
obj.includes = """
deps
deps/crypto/
"""
obj.name = "node-scrypt"
obj.source = "scrypt.cc"
obj.target = "scrypt"
### scryptc.install_path = None
obj.cxxflags = ["-fPIC"]