Permalink
Browse files

Add gyp support.

  • Loading branch information...
hideo55 committed Apr 21, 2012
1 parent b98e82d commit 8d87de6434981167f2f6d00981b4bdd2c2039673
Showing with 25 additions and 21 deletions.
  1. +19 −0 binding.gyp
  2. +4 −2 package.json
  3. +2 −2 src/node_murmurhash3.cc
  4. +0 −17 wscript
View
@@ -0,0 +1,19 @@
+{
+ 'targets' : [
+ {
+ 'target_name' : 'murmurhash3',
+ 'sources' : ['src/MurmurHash3.cpp', 'src/node_murmurhash3.cc'],
+ 'cflags': ['-fexceptions'],
+ 'cflags_cc': ['-fexceptions'],
+ 'cflags!': [ '-fno-exceptions' ],
+ 'cflags_cc!': [ '-fno-exception' ],
+ 'conditions':[
+ ['OS=="mac"', {
+ 'xcode_settings': {
+ 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'
+ }
+ }]
+ ]
+ }
+ ]
+}
View
@@ -5,7 +5,9 @@
"repository": "https://github.com/hideo55/node-murmurhash3",
"keywords": ["hash", "murmurhash"],
"author": "Hideaki Ohno <hide.o.j55@gmail.com>",
- "dependencies": {},
+ "dependencies": {
+ "node-gyp": ""
+ },
"devDependencies": {
"nodeunit": ""
},
@@ -14,7 +16,7 @@
"node": ">=0.6.x"
},
"scripts": {
- "install": "node-waf configure build",
+ "install": "node-gyp configure build",
"test": "nodeunit --reporter tap test.js"
}
}
View
@@ -80,7 +80,7 @@ Handle<Value> murmur32_async(const Arguments& args) {
Baton* baton = new Baton(key, args[1]->ToBoolean()->Value(), callback);
- int status = uv_queue_work(uv_default_loop(), &baton->request, Work_murmur32, Work_After_murmur32);
+ uv_queue_work(uv_default_loop(), &baton->request, Work_murmur32, Work_After_murmur32);
return scope.Close(Undefined());
}
@@ -96,7 +96,7 @@ Handle<Value> murmur128_async(const Arguments& args) {
Baton* baton = new Baton(key, args[1]->ToBoolean()->Value(), callback);
- int status = uv_queue_work(uv_default_loop(), &baton->request, Work_murmur128, Work_After_murmur128);
+ uv_queue_work(uv_default_loop(), &baton->request, Work_murmur128, Work_After_murmur128);
return scope.Close(Undefined());
}
View
17 wscript
@@ -1,17 +0,0 @@
-import Options, Utils
-
-srcdir = '.'
-blddir = 'build'
-VERSION = '0.0.1'
-
-def set_options(opt):
- opt.tool_options('compiler_cxx')
-
-def configure(conf):
- conf.check_tool('compiler_cxx')
- conf.check_tool('node_addon')
-
-def build(bld):
- obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
- obj.target = 'murmurhash3'
- obj.source = './src/node_murmurhash3.cc ./src/MurmurHash3.cpp'

0 comments on commit 8d87de6

Please sign in to comment.