def set_options(opt): opt.tool_options("compiler_cxx") def configure(conf): conf.check_tool("compiler_cxx") conf.check_tool("node_addon") conf.env.append_value("LIB_LIBCLIENT", "client") conf.env.append_value("LIBPATH_LIBCLIENT", "/usr/local/p4api/lib") conf.env.append_value("LIB_LIBRPC", "rpc") conf.env.append_value("LIBPATH_LIBRPC", "/usr/local/p4api/lib") conf.env.append_value("LIB_LIBSUPP", "supp") conf.env.append_value("LIBPATH_LIBSUPP", "/usr/local/p4api/lib") def build(bld): obj = bld.new_task_gen("cxx", "shlib", "node_addon") obj.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall","-I/usr/local/p4api/include/p4", "-L/usr/local/p4api/lib"] obj.target = "p4nodeapi" obj.source = "p4nodeapi.cc basicuser.cc" obj.uselib = ['LIBCLIENT', 'LIBRPC','LIBSUPP']