Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Revert static library build.
Browse files Browse the repository at this point in the history
Not necessary to build dll modules after all.
  • Loading branch information
ry committed Sep 1, 2009
1 parent 8ea6adc commit 8152f9c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 43 deletions.
7 changes: 0 additions & 7 deletions src/main.cc

This file was deleted.

3 changes: 2 additions & 1 deletion src/node.cc
Expand Up @@ -142,6 +142,7 @@ node_dlopen (const v8::Arguments& args)
Local<Object> target = args[1]->ToObject(); Local<Object> target = args[1]->ToObject();


void *handle = dlopen(*filename, RTLD_LAZY); void *handle = dlopen(*filename, RTLD_LAZY);

if (handle == NULL) { if (handle == NULL) {
Local<Value> exception = Exception::Error(String::New(dlerror())); Local<Value> exception = Exception::Error(String::New(dlerror()));
return ThrowException(exception); return ThrowException(exception);
Expand Down Expand Up @@ -370,7 +371,7 @@ ParseArgs (int *argc, char **argv)
} }


int int
node::start (int argc, char *argv[]) main(int argc, char *argv[])
{ {
evcom_ignore_sigpipe(); evcom_ignore_sigpipe();
ev_default_loop(EVFLAG_AUTO); // initialize the default ev loop. ev_default_loop(EVFLAG_AUTO); // initialize the default ev loop.
Expand Down
1 change: 0 additions & 1 deletion src/node.h
Expand Up @@ -31,7 +31,6 @@ do { \
enum encoding {ASCII, UTF8, RAW}; enum encoding {ASCII, UTF8, RAW};
enum encoding ParseEncoding (v8::Handle<v8::Value> encoding_v); enum encoding ParseEncoding (v8::Handle<v8::Value> encoding_v);
void FatalException (v8::TryCatch &try_catch); void FatalException (v8::TryCatch &try_catch);
int start (int argc, char *argv[]);


} // namespace node } // namespace node
#endif // node_h #endif // node_h
47 changes: 13 additions & 34 deletions wscript
Expand Up @@ -61,13 +61,14 @@ def configure(conf):
conf.env["USE_DEBUG"] = Options.options.debug conf.env["USE_DEBUG"] = Options.options.debug


conf.check(lib='dl', uselib_store='DL') conf.check(lib='dl', uselib_store='DL')
conf.env.append_value("CCFLAGS", "-rdynamic")
conf.env.append_value("LINKFLAGS_DL", "-rdynamic") conf.env.append_value("LINKFLAGS_DL", "-rdynamic")


if Options.options.debug: #if Options.options.debug:
conf.check(lib='profiler', uselib_store='PROFILER') # conf.check(lib='profiler', uselib_store='PROFILER')


if Options.options.efence: #if Options.options.efence:
conf.check(lib='efence', libpath=['/usr/lib', '/usr/local/lib'], uselib_store='EFENCE') # conf.check(lib='efence', libpath=['/usr/lib', '/usr/local/lib'], uselib_store='EFENCE')


if sys.platform.startswith("freebsd"): if sys.platform.startswith("freebsd"):
if not conf.check(lib="execinfo", libpath=['/usr/lib', '/usr/local/lib'], uselib_store="EXECINFO"): if not conf.check(lib="execinfo", libpath=['/usr/lib', '/usr/local/lib'], uselib_store="EXECINFO"):
Expand Down Expand Up @@ -234,10 +235,10 @@ def build(bld):
native_cc.clone("debug") native_cc.clone("debug")


### node lib ### node lib
libnode = bld.new_task_gen("cxx", "shlib") node = bld.new_task_gen("cxx", "program")
libnode.name = "node" node.name = "node"
libnode.target = "node" node.target = "node"
libnode.source = """ node.source = """
src/node.cc src/node.cc
src/events.cc src/events.cc
src/http.cc src/http.cc
Expand All @@ -249,7 +250,7 @@ def build(bld):
src/child_process.cc src/child_process.cc
src/constants.cc src/constants.cc
""" """
libnode.includes = """ node.includes = """
src/ src/
deps/v8/include deps/v8/include
deps/libev deps/libev
Expand All @@ -259,25 +260,9 @@ def build(bld):
deps/http_parser deps/http_parser
deps/coupling deps/coupling
""" """
libnode.uselib_local = "evcom ev eio http_parser coupling" node.uselib_local = "evcom ev eio http_parser coupling"
libnode.uselib = "UDNS V8 EXECINFO PROFILER EFENCE DL" node.uselib = "UDNS V8 EXECINFO DL"
libnode.install_path = '${PREFIX}/lib' node.install_path = '${PREFIX}/lib'


libnode_static = bld.new_task_gen("cxx", "staticlib")
libnode_static.name = "node-static"
libnode_static.target = libnode.target
libnode_static.source = libnode.source
libnode_static.includes = libnode.includes
libnode_static.uselib_local = libnode.uselib_local
libnode_static.uselib = libnode.uselib

### node
node = bld.new_task_gen("cxx", "program")
node.target = 'node'
node.source = "src/main.cc"
node.includes = libnode.includes
node.uselib_local = "node-static"
node.install_path = '${PREFIX}/bin' node.install_path = '${PREFIX}/bin'
node.chmod = 0755 node.chmod = 0755


Expand Down Expand Up @@ -307,12 +292,6 @@ def build(bld):
if bld.env["USE_DEBUG"]: if bld.env["USE_DEBUG"]:
node_g = node.clone("debug") node_g = node.clone("debug")
node_g.target = "node_g" node_g.target = "node_g"

libnode_g = libnode.clone("debug")
libnode_g.target = "node_g"

libnode_static_g = libnode_static.clone("debug")
libnode_static_g.target = "node_g"


node_version_g = node_version.clone("debug") node_version_g = node_version.clone("debug")
node_version_g.dict = subflags(node_g) node_version_g.dict = subflags(node_g)
Expand Down

0 comments on commit 8152f9c

Please sign in to comment.