view nodejs/wscript @ 936:a9abcdac0ae5

Fix issue of moving lightbar of testsvg.js. The lightbar does not move as expectation. It caused by compute trasnforming matrix that transform saved points from the space when saving points to current space. The transform matrix should not include matric of the owner of saved points.
author Thinker K.F. Li <thinker@codemud.net>
date Fri, 12 Nov 2010 16:53:03 +0800
parents da12923a789a
children 60e7e666a573
line wrap: on
line source

srcdir = '.'
blddir = 'build'
VERSION = '0.0.1'

def set_options(opt):
    opt.tool_options('compiler_cxx')
    opt.tool_options('compiler_cc')
    pass

def configure(conf):
    import Options
    import os
    
    conf.check_tool('compiler_cxx')
    conf.check_tool('compiler_cc')
    conf.check_tool('node_addon')
    conf.env.SRCDIR = Options.options.srcdir
    conf.env.TOP_BUILDDIR = os.environ['TOP_BUILDDIR']
    pass

def build(conf):
    import Utils
    
    for m in 'observer coord mbfly_njs shapes paints'.split():
        conf(rule='m4 -I ${SRCDIR}/../tools gen_v8_binding.m4 ${SRC} > ${TGT}',
             source=m+'.m4', target=m+'-inc.h',
             name=m+'-inc', shell=True, always=True, before=['cxx'])
        pass

    obj = conf.new_task_gen('cxx', 'shlib', 'node_addon')
    obj.target = 'mbfly'
    obj.source = 'font.cc image_ldr.cc'
    obj.add_objects = 'X_supp_njs.o observer.o coord.o mbfly_njs.o ' + \
        'shapes.o paints.o'
    obj.staticlib = 'mbfly'

    for src in 'observer.cc coord.cc mbfly_njs.cc shapes.cc paints.cc'.split():
        obj = conf.new_task_gen('cxx', 'shlib', 'node_addon')
        obj.target = src[:-3] + '.o'
        obj.source = src
        obj.includes = '.'
        pass
    
    obj = conf.new_task_gen('cc', 'shlib', 'node_addon')
    obj.target = 'X_supp_njs.o'
    obj.source = 'X_supp_njs.c'
    pass