Browse Source

Make addon building work for Cygwin.

v0.7.4-release
Brian McKenna 15 years ago
committed by Ryan Dahl
parent
commit
431e72cbe8
  1. 3
      tools/wafadmin/Tools/node_addon.py
  2. 6
      wscript

3
tools/wafadmin/Tools/node_addon.py

@ -41,6 +41,9 @@ def detect(conf):
found = os.path.exists(join(prefix, "bin/node")) found = os.path.exists(join(prefix, "bin/node"))
conf.check_message('node prefix', '', found, prefix) 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 ## On Mac OSX we need to use mac bundles
if Options.platform == 'darwin': conf.check_tool('osx') if Options.platform == 'darwin': conf.check_tool('osx')

6
wscript

@ -486,6 +486,12 @@ def build(bld):
node.add_objects += ' cares ' node.add_objects += ' cares '
node.includes += ' deps/c-ares deps/c-ares/' + bld.env['DEST_OS'] + '-' + bld.env['DEST_CPU'] 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): def subflags(program):
if os.path.exists(join(cwd, ".git")): if os.path.exists(join(cwd, ".git")):
actual_version=cmd_output("git describe").strip() actual_version=cmd_output("git describe").strip()

Loading…
Cancel
Save