Permalink
Browse files

use node-gyp to build

  • Loading branch information...
1 parent 73932a0 commit a204998037504ed156fdd1abbd36d7719d007641 @wadey committed Mar 14, 2012
Showing with 13 additions and 25 deletions.
  1. +8 −0 binding.gyp
  2. +1 −9 index.js
  3. +4 −1 package.json
  4. +0 −15 wscript
View
@@ -0,0 +1,8 @@
+{
+ 'targets': [
+ {
+ 'target_name': 'microtime',
+ 'sources': [ 'src/microtime.cc' ]
+ }
+ ]
+}
View
@@ -1,12 +1,4 @@
-var binding
-
-//
-// Try catch here around multiple build paths to support
-// `node@0.4.x` and `node@0.6.x`.
-// (from https://github.com/indexzero/daemon.node)
-//
-try { binding = require('./build/default/microtime') }
-catch (ex) { binding = require('./build/Release/microtime') }
+var binding = require('bindings')('microtime.node')
exports.now = binding.now
exports.nowDouble = binding.nowDouble
View
@@ -7,10 +7,13 @@
"repository": "git://github.com/wadey/node-microtime.git",
"main": "./index",
"engines": {
- "node": ">= 0.2.0"
+ "node": ">= 0.6.0"
},
"scripts": {
"install": "node-waf configure build",
"test": "node test.js"
+ },
+ "dependencies": {
+ "bindings": "~0.3.0"
}
}
View
@@ -1,15 +0,0 @@
-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 = "microtime"
- obj.source = "src/microtime.cc"

0 comments on commit a204998

Please sign in to comment.