Commit a2a3970d by Orlando Vazquez

Bundle our own SQLite3 source file.

By shipping with our own sqlite source file we never depend on SQLite being
installed, and we don't have to go on a wild goose chase in esoteric
directories for every platform we wish to support.
parent 8c039bc4
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
# vim: ft=javascript
import Options
from os import unlink, symlink, system
from os.path import exists, abspath
......@@ -8,30 +9,33 @@ VERSION = "0.0.1"
def set_options(opt):
opt.tool_options("compiler_cxx")
opt.tool_options("compiler_cc")
def configure(conf):
conf.check_tool("compiler_cxx")
conf.check_tool("compiler_cc")
conf.check_tool("node_addon")
if not conf.check_cfg(package='sqlite3', args='--cflags --libs', uselib_store='SQLITE3'):
if not conf.check(lib="sqlite3", libpath=['/usr/local/lib', '/opt/local/lib'], uselib_store="SQLITE3"):
conf.fatal('Missing sqlite3');
conf.env.append_value('LIBPATH_SQLITE3', '/opt/local/lib');
# conf.check_cfg(package='profiler', args='--cflags --libs', uselib_store='SQLITE3')
# conf.env.append_value('LIBPATH_PROFILER', '/usr/local/lib')
# conf.env.append_value('LIB_PROFILER', 'profiler')
conf.env.append_value("LIBPATH_MPOOL", abspath("./deps/mpool-2.1.0/"))
conf.env.append_value("LIB_MPOOL", "mpool")
conf.env.append_value("CPPPATH_MPOOL", abspath("./deps/mpool-2.1.0/"))
conf.env.append_value('LIBPATH_SQLITE', abspath('./deps/sqlite/'))
conf.env.append_value('LIB_SQLITE', abspath('sqlite'))
conf.env.append_value('CPATH_SQLITE', abspath('./deps/sqlite/'))
def build(bld):
system("cd deps/mpool-2.1.0/; make");
sqlite = bld.new_task_gen('cc', 'shlib')
sqlite.ccflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall"]
sqlite.source = "deps/sqlite/sqlite3.c"
sqlite.target = "deps/sqlite/sqlite3.so"
obj = bld.new_task_gen("cxx", "shlib", "node_addon")
obj.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall"]
obj.target = "sqlite3_bindings"
obj.source = "src/sqlite3_bindings.cc src/database.cc src/statement.cc"
obj.uselib = "SQLITE3 PROFILER MPOOL"
obj.uselib = "MPOOL"
t = 'sqlite3_bindings.node'
def shutdown():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment