Skip to content
Browse files

updated to build using gyp on OS X and SmartOS

  • Loading branch information...
1 parent 7b79044 commit 74a5401cbde96f8b1bc519887734d695ef07686d @cobracmder committed Apr 2, 2013
Showing with 35 additions and 31 deletions.
  1. +1 −1 .gitignore
  2. +4 −8 README.md
  3. +19 −0 binding.gyp
  4. +3 −0 index.js
  5. +2 −0 libdtrace.cc
  6. +6 −6 package.json
  7. +0 −16 wscript
View
2 .gitignore
@@ -1,2 +1,2 @@
/build
-/.lock-wscript
+/node_modules
View
12 README.md
@@ -21,17 +21,15 @@ Platforms
---------
This should work on any platform that supports DTrace, and is known to work on
-Mac OS X (tested on 10.6.4) and Solaris, OpenSolaris and derivatives (tested on
-Nevada 121 and later).
+Mac OS X (tested on 10.7.5) and illumos (tested on
+SmartOS).
Installation
------------
-As an addon, nod-libdtrace is installed in the usual way:
+As an addon, node-libdtrace is installed in the usual way:
- % node-waf configure
- % node-waf build
- % node-waf
+ % npm install libdtrace
API
---
@@ -201,5 +199,3 @@ sorted by executable name:
sys.puts('');
}, 1000);
-
-
View
19 binding.gyp
@@ -0,0 +1,19 @@
+{
+ 'targets': [
+ {
+ 'target_name': 'libdtrace',
+ 'cflags_cc': ['-fexceptions'],
+ 'ldflags': ['-ldtrace'],
+ 'sources': [
+ 'libdtrace.cc'
+ ],
+ 'libraries': ['-ldtrace'],
+ 'xcode_settings': {
+ 'OTHER_CPLUSPLUSFLAGS': [
+ '-fexceptions',
+ '-Wunused-variable',
+ ],
+ }
+ },
+ ]
+}
View
3 index.js
@@ -0,0 +1,3 @@
+var libdtrace = require('bindings')('dtrace.node');
+
+module.exports=libdtrace;
View
2 libdtrace.cc
@@ -892,3 +892,5 @@ init (Handle<Object> target)
{
DTraceConsumer::Initialize(target);
}
+
+NODE_MODULE(dtrace, init);
View
12 package.json
@@ -1,12 +1,12 @@
{
"name": "libdtrace",
- "version": "0.0.2",
+ "version": "0.0.3",
"description": "Solaris libdtrace bindings",
"homepage": "https://github.com/bcantrill/node-libdtrace",
"author": "Joyent (joyent.com)",
- "engines": { "node": ">=0.6" },
- "main": "./build/Release/libdtrace",
- "scripts": {
- "install": "node-waf configure build"
- }
+ "engines": { "node": ">=0.8" },
+ "main": "./index.js",
+ "dependencies": {
+ "bindings": "1.0.0"
+ }
}
View
16 wscript
@@ -1,16 +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 = 'libdtrace'
- obj.ldflags = '-ldtrace'
- obj.source = 'libdtrace.cc'

0 comments on commit 74a5401

Please sign in to comment.
Something went wrong with that request. Please try again.