def options(ctx): pass

def configure(ctx): pass

def build(bld):
  if not bld.is_defined('JUBATUS_DISABLE_ASSERTIONS'):
    libassert = " LIBGLOG"
  else:
    libassert = ""

  bld.shlib(
    source = [
      'graph_base.cpp',
      'graph_wo_index.cpp',
      'graph_factory.cpp'
      ],
    target = 'jubatus_graph',
    name = 'jubatus_graph',
    includes = '.',
    use = 'jubatus_util MSGPACK jubacommon'+libassert)

  def make_test(s):
    bld.program(
      features = 'gtest',
      source = s,
      target = s[0:s.rfind('.')],
      includes = '.',
      use = 'jubatus_util jubacommon jubatus_graph'+libassert)

  map(make_test, [
      'graph_base_test.cpp',
      'graph_wo_index_test.cpp',
      ])

  bld.install_files('${PREFIX}/include/jubatus/core/graph', [
      'graph_base.hpp',
      'graph_factory.hpp',
      'graph_type.hpp',
      'graph_wo_index.hpp',
      ])
