def configure(conf):
  pass

def build(bld):
  bld.install_files('${HPREFIX}/math', [
      'constant.h',
      'random.h',
      'random/license.h',
      'random/mersenne_twister.h',
      'vector.h',
      'fft.h',
      ], relative_trick = True)

  bld.shlib(
    source = 'random/mersenne_twister.cpp',
    target = 'pficommon_math',
    vnum = bld.env['VERSION'],
    includes = '.')
  
  def t(src):
    tgt = src.split('/')[-1].split('.')[0]
    bld.program(
      features = 'gtest',
      source = src,
      target = tgt,
      includes = '.',
      use = 'pficommon_math pficommon_system')

  t('random_test.cpp')
  t('ratio_test.cpp')
  t('vector_test.cpp')
  t('fft_test.cpp')
  t('include_test.cpp')
  t('instantiation_test.cpp')
