Mercurial > MadButterfly
view nodejs/wscript @ 665:7db0b76c9480
Simplify wscript
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 04 Aug 2010 21:33:43 +0800 |
parents | 90c7726bc953 |
children | 7685c57e29d0 |
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 conf(rule='m4 -I ${SRCDIR}/../tools gen_v8_binding.m4 ${SRC} > ${TGT}', source='observer.m4', target='observer-inc.h', name='observer-inc', shell=True, always=True, before=['cxx']) conf(rule='m4 -I ${SRCDIR}/../tools gen_v8_binding.m4 ${SRC} > ${TGT}', source='coord.m4', target='coord-inc.h', name='coord-inc', shell=True, always=True, before=['cxx']) conf(rule='m4 -I ${SRCDIR}/../tools gen_v8_binding.m4 ${SRC} > ${TGT}', source='mbfly_njs.m4', target='mbfly_njs-inc.h', name='mbfly_njs-inc', shell=True, always=True, before=['cxx']) obj = conf.new_task_gen('cxx', 'shlib', 'node_addon') obj.target = 'mbfly' obj.source = 'shapes.cc paints.cc font.cc ' + \ 'image_ldr.cc' obj.add_objects = 'X_supp_njs.o observer.o coord.o mbfly_njs.o' obj.staticlib = 'mbfly' for src in 'observer.cc coord.cc mbfly_njs.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