diff --git a/configure b/configure index 42dac5ff64ce94..53fed14efccae4 100755 --- a/configure +++ b/configure @@ -841,7 +841,14 @@ def configure_node(o): o['variables']['node_no_browser_globals'] = b(options.no_browser_globals) o['variables']['node_shared'] = b(options.shared) node_module_version = getmoduleversion.get_version() - shlib_suffix = '%s.dylib' if sys.platform == 'darwin' else 'so.%s' + + if sys.platform == 'darwin': + shlib_suffix = '%s.dylib' + elif sys.platform.startswith('aix'): + shlib_suffix = '%s.a' + else: + shlib_suffix = 'so.%s' + shlib_suffix %= node_module_version o['variables']['node_module_version'] = int(node_module_version) o['variables']['shlib_suffix'] = shlib_suffix diff --git a/node.gyp b/node.gyp index 4043269930da27..f252ad2563a0c6 100644 --- a/node.gyp +++ b/node.gyp @@ -916,7 +916,15 @@ 'targets': [ { 'target_name': 'node', - 'type': 'executable', + 'conditions': [ + ['node_shared=="true"', { + 'type': 'shared_library', + 'ldflags': ['--shared'], + 'product_extension': '<(shlib_suffix)', + }, { + 'type': 'executable', + }], + ], 'dependencies': ['<(node_core_target_name)', 'node_exp'], 'include_dirs': [