Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 40 lines (32 sloc) 1.239 kb
dc43b40 @wdavidw Implement system, proc, cpu and net (partially) functions
authored
1 #!/usr/bin/env python
2
3 import sys, os
b3b7f72 @wdavidw Bump to version 0.0.2
authored
4 from os.path import abspath, exists
5 from shutil import copy, rmtree
6
7 def all(all):
8 os.system('node-waf clean')
9 os.system('node-waf configure')
10 os.system('node-waf')
11
12 def clean(cln):
13 if exists('build'): rmtree('build')
dc43b40 @wdavidw Implement system, proc, cpu and net (partially) functions
authored
14
15 def set_options(conf):
16 conf.tool_options("compiler_cxx")
17
18 def configure(conf):
19 conf.check_tool("compiler_cxx")
20 conf.check_tool('node_addon')
21
d8f1c27 @wdavidw Complete implementation
authored
22 srcpath = abspath("deps/sigar")
23 buildpath = abspath("build/sigar")
24 destpath = abspath("build/Release")
25 cmd = "cp -rp %s %s && cd \"%s\" && ./autogen.sh && ./configure --prefix=%s --with-pic && make && make install"
26 if os.system(cmd % (srcpath, buildpath, buildpath, destpath)) != 0:
27 conf.fatal("Configuring sigar failed.")
28 conf.env.append_value("LIBPATH_SIGAR", abspath("build/Release/lib/"))
29 conf.env.append_value("CPPPATH_SIGAR", abspath("build/Release/include/"))
30 conf.env.append_value("STATICLIB_SIGAR", ["sigar"])
dc43b40 @wdavidw Implement system, proc, cpu and net (partially) functions
authored
31
32 def build(conf):
33 t = conf.new_task_gen('cxx', 'shlib', 'node_addon')
34 t.source = [
d8f1c27 @wdavidw Complete implementation
authored
35 'src/node_sigar.cc'
dc43b40 @wdavidw Implement system, proc, cpu and net (partially) functions
authored
36 ]
d8f1c27 @wdavidw Complete implementation
authored
37 #t.cxxflags = ['-g', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE_SOURCE', '-Wall']
dc43b40 @wdavidw Implement system, proc, cpu and net (partially) functions
authored
38 t.target = 'sigar'
39 t.uselib = 'SIGAR'
Something went wrong with that request. Please try again.