mirror of https://github.com/lukechilds/node.git
Ryan Dahl
15 years ago
2 changed files with 51 additions and 0 deletions
@ -0,0 +1,17 @@ |
|||
#!/usr/bin/env python |
|||
import os, sys |
|||
|
|||
|
|||
join = os.path.join |
|||
bindir = os.path.dirname(__file__) |
|||
prefix = join(bindir, "..") |
|||
wafdir = join(prefix, "lib", "node") |
|||
|
|||
w = join(wafdir, 'wafadmin') |
|||
t = join(w, 'Tools') |
|||
sys.path = [w, t] + sys.path |
|||
|
|||
import Scripting |
|||
VERSION="1.5.9" |
|||
Scripting.prepare(t, os.getcwd(), VERSION, wafdir) |
|||
sys.exit(0) |
@ -0,0 +1,34 @@ |
|||
import os |
|||
import TaskGen, Utils, Utils, Runner, Options, Build |
|||
from TaskGen import extension, taskgen, before, after, feature |
|||
from Configure import conf |
|||
|
|||
@taskgen |
|||
@before('apply_incpaths', 'apply_lib_vars', 'apply_type_vars') |
|||
@feature('node_addon') |
|||
@before('apply_bundle') |
|||
def init_node_addon(self): |
|||
self.default_install_path = '${PREFIX}/lib/node/libraries' |
|||
self.uselib = self.to_list(getattr(self, 'uselib', '')) |
|||
if not 'NODE' in self.uselib: self.uselib.append('NODE') |
|||
self.env['MACBUNDLE'] = True |
|||
|
|||
@taskgen |
|||
@before('apply_link', 'apply_lib_vars', 'apply_type_vars') |
|||
@after('apply_bundle') |
|||
@feature('node_addon') |
|||
def node_addon_shlib_ext(self): |
|||
self.env['shlib_PATTERN'] = "%s.node" |
|||
|
|||
@conf |
|||
def check_node_headers(conf): |
|||
join = os.path.join |
|||
wafadmin = join(os.path.dirname(__file__), '..') |
|||
libnode = join(wafadmin, '..') |
|||
lib = join(libnode, '..') |
|||
prefix = join(lib, '..') |
|||
conf.env['LIBPATH_NODE'] = lib |
|||
conf.env['CPPPATH_NODE'] = join(prefix, 'include/node') |
|||
conf.env['CPPFLAGS_NODE'] = '-D_GNU_SOURCE' |
|||
conf.env['CPPFLAGS_NODE'] = '-DEV_MULTIPLICITY=0' |
|||
|
Loading…
Reference in new issue