Skip to content

Instantly share code, notes, and snippets.

@c4milo
Created July 13, 2010 10:52
Show Gist options
  • Save c4milo/473720 to your computer and use it in GitHub Desktop.
Save c4milo/473720 to your computer and use it in GitHub Desktop.
srcdir = "."
blddir = "build"
def set_options(opt):
opt.tool_options("compiler_cxx")
def configure(conf):
conf.check_tool("compiler_cxx")
conf.check_tool("node_addon")
conf.find_program('node', var='NODE', mandatory=True)
if conf.check_cc(header_name="sys/inotify.h"):
conf.check_cc(header_name="sys/inotify.h", function_name="inotify_init")
def build(bld):
obj = bld.new_task_gen("cxx", "shlib", "node_addon")
obj.target = "node-inotify"
obj.source = bld.path.ant_glob('**/*.cc')
camilo@macbooksito:~/Development/node-inotify$ node-waf clean configure build
'clean' finished successfully (0.012s)
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node prefix : ok /usr/local
Checking for program node : /usr/local/bin/node
Checking for header sys/inotify.h : not found
'configure' finished successfully (0.036s)
Waf: Entering directory `/home/camilo/Development/node-inotify/build'
[1/3] cxx: src/node_inotify.cc -> build/default/src/node_inotify_1.o
[2/3] cxx: src/bindings.cc -> build/default/src/bindings_1.o
[3/3] cxx_link: build/default/src/node_inotify_1.o build/default/src/bindings_1.o -> build/default/src/node-inotify.node
Waf: Leaving directory `/home/camilo/Development/node-inotify/build'
'build' finished successfully (0.427s)
camilo@macbooksito:~/Development/node-inotify$ file /usr/include/sys/inotify.h
/usr/include/sys/inotify.h: ASCII C program text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment