Mercurial > MadButterfly
annotate nodejs/wscript @ 683:7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sat, 07 Aug 2010 18:27:53 +0800 |
parents | 7db0b76c9480 |
children | da12923a789a |
rev | line source |
---|---|
544
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
1 srcdir = '.' |
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
2 blddir = 'build' |
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
3 VERSION = '0.0.1' |
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
4 |
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
5 def set_options(opt): |
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
6 opt.tool_options('compiler_cxx') |
546
249bcbf07eb0
Reuse and adapt X_supp.c by implmeneting X_supp_njs.c
Thinker K.F. Li <thinker@branda.to>
parents:
544
diff
changeset
|
7 opt.tool_options('compiler_cc') |
544
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
8 pass |
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
9 |
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
10 def configure(conf): |
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
11 import Options |
556
c9d23f7279a4
The first testcase that nodejs code can show a MadButterfly window.
Thinker K.F. Li <thinker@branda.to>
parents:
547
diff
changeset
|
12 import os |
c9d23f7279a4
The first testcase that nodejs code can show a MadButterfly window.
Thinker K.F. Li <thinker@branda.to>
parents:
547
diff
changeset
|
13 |
544
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
14 conf.check_tool('compiler_cxx') |
546
249bcbf07eb0
Reuse and adapt X_supp.c by implmeneting X_supp_njs.c
Thinker K.F. Li <thinker@branda.to>
parents:
544
diff
changeset
|
15 conf.check_tool('compiler_cc') |
544
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
16 conf.check_tool('node_addon') |
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
17 conf.env.SRCDIR = Options.options.srcdir |
651
aa52883534fc
Code generated by generator can be built
Thinker K.F. Li <thinker@branda.to>
parents:
638
diff
changeset
|
18 conf.env.TOP_BUILDDIR = os.environ['TOP_BUILDDIR'] |
544
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
19 pass |
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
20 |
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
21 def build(conf): |
556
c9d23f7279a4
The first testcase that nodejs code can show a MadButterfly window.
Thinker K.F. Li <thinker@branda.to>
parents:
547
diff
changeset
|
22 import Utils |
c9d23f7279a4
The first testcase that nodejs code can show a MadButterfly window.
Thinker K.F. Li <thinker@branda.to>
parents:
547
diff
changeset
|
23 |
651
aa52883534fc
Code generated by generator can be built
Thinker K.F. Li <thinker@branda.to>
parents:
638
diff
changeset
|
24 conf(rule='m4 -I ${SRCDIR}/../tools gen_v8_binding.m4 ${SRC} > ${TGT}', |
aa52883534fc
Code generated by generator can be built
Thinker K.F. Li <thinker@branda.to>
parents:
638
diff
changeset
|
25 source='observer.m4', target='observer-inc.h', |
aa52883534fc
Code generated by generator can be built
Thinker K.F. Li <thinker@branda.to>
parents:
638
diff
changeset
|
26 name='observer-inc', shell=True, always=True, before=['cxx']) |
661
90c7726bc953
Replace part code of coord.cc by the code generated by generator
Thinker K.F. Li <thinker@branda.to>
parents:
651
diff
changeset
|
27 conf(rule='m4 -I ${SRCDIR}/../tools gen_v8_binding.m4 ${SRC} > ${TGT}', |
90c7726bc953
Replace part code of coord.cc by the code generated by generator
Thinker K.F. Li <thinker@branda.to>
parents:
651
diff
changeset
|
28 source='coord.m4', target='coord-inc.h', |
90c7726bc953
Replace part code of coord.cc by the code generated by generator
Thinker K.F. Li <thinker@branda.to>
parents:
651
diff
changeset
|
29 name='coord-inc', shell=True, always=True, before=['cxx']) |
665 | 30 conf(rule='m4 -I ${SRCDIR}/../tools gen_v8_binding.m4 ${SRC} > ${TGT}', |
31 source='mbfly_njs.m4', target='mbfly_njs-inc.h', | |
32 name='mbfly_njs-inc', shell=True, always=True, before=['cxx']) | |
683
7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
665
diff
changeset
|
33 conf(rule='m4 -I ${SRCDIR}/../tools gen_v8_binding.m4 ${SRC} > ${TGT}', |
7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
665
diff
changeset
|
34 source='shapes.m4', target='shapes-inc.h', |
7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
665
diff
changeset
|
35 name='shapes-inc', shell=True, always=True, before=['cxx']) |
651
aa52883534fc
Code generated by generator can be built
Thinker K.F. Li <thinker@branda.to>
parents:
638
diff
changeset
|
36 |
544
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
37 obj = conf.new_task_gen('cxx', 'shlib', 'node_addon') |
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
38 obj.target = 'mbfly' |
683
7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
665
diff
changeset
|
39 obj.source = 'paints.cc font.cc image_ldr.cc' |
7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
665
diff
changeset
|
40 obj.add_objects = 'X_supp_njs.o observer.o coord.o mbfly_njs.o shapes.o' |
556
c9d23f7279a4
The first testcase that nodejs code can show a MadButterfly window.
Thinker K.F. Li <thinker@branda.to>
parents:
547
diff
changeset
|
41 obj.staticlib = 'mbfly' |
651
aa52883534fc
Code generated by generator can be built
Thinker K.F. Li <thinker@branda.to>
parents:
638
diff
changeset
|
42 |
683
7685c57e29d0
Migrate JS shapes binding to gen_v8_binding.m4
Thinker K.F. Li <thinker@branda.to>
parents:
665
diff
changeset
|
43 for src in 'observer.cc coord.cc mbfly_njs.cc shapes.cc'.split(): |
665 | 44 obj = conf.new_task_gen('cxx', 'shlib', 'node_addon') |
45 obj.target = src[:-3] + '.o' | |
46 obj.source = src | |
47 obj.includes = '.' | |
48 pass | |
49 | |
546
249bcbf07eb0
Reuse and adapt X_supp.c by implmeneting X_supp_njs.c
Thinker K.F. Li <thinker@branda.to>
parents:
544
diff
changeset
|
50 obj = conf.new_task_gen('cc', 'shlib', 'node_addon') |
249bcbf07eb0
Reuse and adapt X_supp.c by implmeneting X_supp_njs.c
Thinker K.F. Li <thinker@branda.to>
parents:
544
diff
changeset
|
51 obj.target = 'X_supp_njs.o' |
249bcbf07eb0
Reuse and adapt X_supp.c by implmeneting X_supp_njs.c
Thinker K.F. Li <thinker@branda.to>
parents:
544
diff
changeset
|
52 obj.source = 'X_supp_njs.c' |
544
16f4f8305c8f
Start MadButterfly nodejs plugin
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
53 pass |