--- node-v0.10.3-o/Makefile 2013-04-03 11:30:57.000000000 -0600 +++ node-v0.10.3/Makefile 2013-04-03 19:30:22.000000000 -0600 @@ -54,11 +54,13 @@ config.gypi: configure $(PYTHON) ./configure -install: all - $(PYTHON) tools/install.py $@ $(DESTDIR) +install: all justinstall + +justinstall: + $(PYTHON) tools/install.py install $(DESTDIR) $(LIBDIR) uninstall: - $(PYTHON) tools/install.py $@ $(DESTDIR) + $(PYTHON) tools/install.py $@ $(DESTDIR) $(LIBDIR) clean: -rm -rf out/Makefile node node_g out/$(BUILDTYPE)/node blog.html email.md --- node-v0.10.3-o/node.gyp 2013-04-03 11:30:57.000000000 -0600 +++ node-v0.10.3/node.gyp 2013-04-03 19:30:22.000000000 -0600 @@ -67,17 +67,35 @@ 'type': 'executable', 'dependencies': [ - 'node_js2c#host', + 'libnode' ], - 'include_dirs': [ - 'src', - 'tools/msvs/genfiles', - 'deps/uv/src/ares', - '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h + 'conditions': [ + [ 'node_shared_libuv=="false"', { + 'dependencies': [ 'deps/uv/uv.gyp:libuv' ], + }], ], 'sources': [ + 'src/node_main.cc', + # node.gyp is added to the project by default. + 'common.gypi', + ], + + 'defines': [ + 'NODE_WANT_INTERNALS=1', + 'ARCH="<(target_arch)"', + 'PLATFORM="<(OS)"', + ], + }, + { + 'target_name': 'libnode', + 'type': 'shared_library', + 'product_extension': 'so.10.3.0', + 'soname_version': '10.3.0', + 'cflags': ['-fPIC'], + + 'sources': [ 'src/fs_event_wrap.cc', 'src/cares_wrap.cc', 'src/handle_wrap.cc', @@ -88,7 +106,6 @@ 'src/node_file.cc', 'src/node_http_parser.cc', 'src/node_javascript.cc', - 'src/node_main.cc', 'src/node_os.cc', 'src/node_script.cc', 'src/node_stat_watcher.cc', @@ -137,6 +154,17 @@ 'common.gypi', ], + 'include_dirs': [ + 'src', + 'tools/msvs/genfiles', + 'deps/uv/src/ares', + '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h + ], + + 'dependencies': [ + 'node_js2c#host', + ], + 'defines': [ 'NODE_WANT_INTERNALS=1', 'ARCH="<(target_arch)"', --- node-v0.10.3-o/tools/install.py 2013-04-03 11:30:57.000000000 -0600 +++ node-v0.10.3/tools/install.py 2013-04-03 19:31:32.000000000 -0600 @@ -119,7 +119,9 @@ assert(0) # unhandled action type def files(action): + global lib_dir action(['out/Release/node'], 'bin/node') + action(['out/Release/lib.target/libnode.so.10.3.0'], lib_dir + '/libnode.so.10.3.0') # install unconditionally, checking if the platform supports dtrace doesn't # work when cross-compiling and besides, there's at least one linux flavor @@ -134,7 +136,7 @@ if 'true' == variables.get('node_install_npm'): npm_files(action) def run(args): - global dst_dir, node_prefix, target_defaults, variables + global dst_dir, node_prefix, target_defaults, variables, lib_dir # chdir to the project's top-level directory os.chdir(abspath(os.path.dirname(__file__), '..')) @@ -147,6 +149,9 @@ dst_dir = node_prefix = variables.get('node_prefix') or '/usr/local' if len(args) > 2: dst_dir = abspath(args[2] + '/' + dst_dir) + lib_dir = 'lib' + if len(args) > 3: lib_dir = args[3] + cmd = args[1] if len(args) > 1 else 'install' if cmd == 'install': return files(install) if cmd == 'uninstall': return files(uninstall)