Created
June 11, 2010 05:19
-
-
Save puffnfresh/434086 to your computer and use it in GitHub Desktop.
Adds addon support for node.js on Cygwin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/tools/wafadmin/Tools/node_addon.py b/tools/wafadmin/Tools/node_addon.py | |
| index 9462b60..72748c9 100644 | |
| --- a/tools/wafadmin/Tools/node_addon.py | |
| +++ b/tools/wafadmin/Tools/node_addon.py | |
| @@ -41,6 +41,9 @@ def detect(conf): | |
| found = os.path.exists(join(prefix, "bin/node")) | |
| conf.check_message('node prefix', '', found, prefix) | |
| + ## On Cygwin we need to link to the generated symbol definitions | |
| + if Options.platform.startswith('cygwin'): conf.env['LIB_NODE'] = 'node' | |
| + | |
| ## On Mac OSX we need to use mac bundles | |
| if Options.platform == 'darwin': conf.check_tool('osx') | |
| diff --git a/wscript b/wscript | |
| index 736344b..2ec2127 100644 | |
| --- a/wscript | |
| +++ b/wscript | |
| @@ -486,6 +486,12 @@ def build(bld): | |
| node.add_objects += ' cares ' | |
| node.includes += ' deps/c-ares deps/c-ares/' + bld.env['DEST_OS'] + '-' + bld.env['DEST_CPU'] | |
| + if sys.platform.startswith('cygwin'): | |
| + bld.env.append_value('LINKFLAGS', '-Wl,--export-all-symbols') | |
| + bld.env.append_value('LINKFLAGS', '-Wl,--out-implib,default/libnode.dll.a') | |
| + bld.env.append_value('LINKFLAGS', '-Wl,--output-def,default/libnode.def') | |
| + bld.install_files('${PREFIX}/lib', "build/default/libnode.*") | |
| + | |
| def subflags(program): | |
| if os.path.exists(join(cwd, ".git")): | |
| actual_version=cmd_output("git describe").strip() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment