#!/usr/bin/env python
# coding: utf-8

def build(ctx):
    lc_inc_dir = ctx.path.find_dir('../latcommon/include')
    inc_dir = ctx.path.find_dir('include')
    src_dir = ctx.path.find_dir('src')

    ctx(features='cxx cxxstlib',
            source=src_dir.ant_glob('**/*.cc'),
            includes=[inc_dir, lc_inc_dir],
            target='latbuilder',
            install_path='${LIBDIR}')

    # header files
    for inc in inc_dir.ant_glob('**/*.h'):
        ctx.install_files('${INCLUDEDIR}/' + inc.parent.path_from(inc_dir), inc)
