diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2010-06-17 18:23:40 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-06-17 18:23:43 -0700 |
commit | 01a8d270cf4ed84887ab5e6829e929ba737e4cdf (patch) | |
tree | af3d40738bb1b2768eaf7d25b88c7cf4d0427c74 /wscript | |
parent | 964ed9739b8984c6b9c78a20804e84c9e354bb1b (diff) | |
download | node-new-01a8d270cf4ed84887ab5e6829e929ba737e4cdf.tar.gz |
Add platform files, move getmem to node::OS class.
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -16,7 +16,6 @@ srcdir = '.' blddir = 'build' - jobs=1 if os.environ.has_key('JOBS'): jobs = int(os.environ['JOBS']) @@ -278,7 +277,7 @@ def configure(conf): conf.env.append_value('CXXFLAGS', '-DHAVE_FDATASYNC=0') # platform - platform_def = '-DPLATFORM=' + sys.platform + platform_def = '-DPLATFORM=' + conf.env['DEST_OS'] conf.env.append_value('CCFLAGS', platform_def) conf.env.append_value('CXXFLAGS', platform_def) @@ -468,7 +467,15 @@ def build(bld): src/node_timer.cc src/node_script.cc """ - if bld.env["USE_OPENSSL"]: node.source += "src/node_crypto.cc" + + platform_file = "src/platform_%s.cc" % bld.env['DEST_OS'] + if os.path.exists(join(cwd, platform_file)): + node.source += platform_file + else: + node.source += "src/platform_none.cc " + + + if bld.env["USE_OPENSSL"]: node.source += " src/node_crypto.cc " node.includes = """ src/ |