Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 34 lines (27 sloc) 0.91 kb
9fcd743 @waveto first commit
authored
1 import Options
2 from os import unlink, symlink, popen
3 from os.path import exists
4
5 srcdir = "."
6 blddir = "build"
7 VERSION = "0.0.1"
8
9 def set_options(opt):
10 opt.tool_options("compiler_cxx")
11 opt.tool_options("compiler_cc")
12
13 def configure(conf):
14 conf.check_tool("compiler_cxx")
15 conf.check_tool("compiler_cc")
16 conf.check_tool("node_addon")
17
18 conf.check(lib='z', libpath=['/usr/lib', '/usr/local/lib'], uselib_store='ZLIB')
19
20 def build(bld):
21 obj = bld.new_task_gen("cxx", "shlib", "node_addon")
22 obj.target = "compress"
23 obj.source = "compress.cc"
24 obj.uselib = "ZLIB"
25
26 def shutdown():
27 # HACK to get compress.node out of build directory.
28 # better way to do this?
29 if Options.commands['clean']:
30 if exists('compress.node'): unlink('compress.node')
31 else:
32 if exists('build/default/compress.node') and not exists('compress.node'):
33 symlink('build/default/compress.node', 'compress.node')
Something went wrong with that request. Please try again.