1 | ############################################################################## |
---|
2 | # Copyright 2005-2006 Andreas Huber Doenni |
---|
3 | # Distributed under the Boost Software License, Version 1.0. (See accompany- |
---|
4 | # ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
---|
5 | ############################################################################## |
---|
6 | |
---|
7 | project libs/statechart/example ; |
---|
8 | |
---|
9 | local custom = <define>CUSTOMIZE_MEMORY_MANAGEMENT ; |
---|
10 | local native = <define>BOOST_STATECHART_USE_NATIVE_RTTI ; |
---|
11 | |
---|
12 | rule independent-obj-build ( |
---|
13 | name : directory : cpp-sources + : requirements * ) |
---|
14 | { |
---|
15 | local objs ; |
---|
16 | |
---|
17 | for local cpp-source in $(cpp-sources) |
---|
18 | { |
---|
19 | obj $(name)$(cpp-source) |
---|
20 | : $(directory)/$(cpp-source).cpp : $(requirements) ; |
---|
21 | objs += $(name)$(cpp-source) ; |
---|
22 | } |
---|
23 | |
---|
24 | return $(objs) ; |
---|
25 | } |
---|
26 | |
---|
27 | rule statechart-st-example-build ( |
---|
28 | name : directory : cpp-sources + : requirements * ) |
---|
29 | { |
---|
30 | exe $(name) : [ independent-obj-build $(name) |
---|
31 | : $(directory) : $(cpp-sources) |
---|
32 | # Some platforms have either problems with the automatic |
---|
33 | # detection of the threading mode (e.g. vc-7_1 & |
---|
34 | # gcc >= 3.4.0) or don't support single-threaded mode |
---|
35 | # (e.g. vc-8_0). We therefore manually turn MT |
---|
36 | # off here |
---|
37 | : <threading>single <define>BOOST_DISABLE_THREADS $(requirements) ] ; |
---|
38 | |
---|
39 | return $(name) ; |
---|
40 | } |
---|
41 | |
---|
42 | rule statechart-mt-example-build ( |
---|
43 | name : directory : cpp-sources + : requirements * ) |
---|
44 | { |
---|
45 | exe $(name) : [ independent-obj-build $(name) |
---|
46 | : $(directory) : $(cpp-sources) |
---|
47 | : <threading>multi $(requirements) ] |
---|
48 | ../../thread/build//boost_thread ; |
---|
49 | |
---|
50 | return $(name) ; |
---|
51 | } |
---|
52 | |
---|
53 | stage run |
---|
54 | : [ statechart-st-example-build BitMachine : BitMachine : BitMachine ] |
---|
55 | [ statechart-st-example-build Camera |
---|
56 | : Camera : Camera Configuring Main Shooting ] |
---|
57 | [ statechart-st-example-build Handcrafted : Handcrafted : Handcrafted ] |
---|
58 | [ statechart-st-example-build KeyboardNormal : Keyboard : Keyboard ] |
---|
59 | [ statechart-st-example-build KeyboardNative |
---|
60 | : Keyboard : Keyboard : $(native) ] |
---|
61 | [ statechart-st-example-build PingPongSingle |
---|
62 | : PingPong : PingPong : $(custom) ] |
---|
63 | [ statechart-mt-example-build PingPongMulti1 |
---|
64 | : PingPong : PingPong : $(custom) ] |
---|
65 | [ statechart-mt-example-build PingPongMulti2 |
---|
66 | : PingPong : PingPong : $(custom) <define>USE_TWO_THREADS ] |
---|
67 | [ statechart-st-example-build StopWatch : StopWatch : StopWatch ] |
---|
68 | [ statechart-st-example-build StopWatch2 : StopWatch : StopWatch2 ] |
---|
69 | [ statechart-st-example-build PerformanceNormal |
---|
70 | : Performance : Performance ] |
---|
71 | [ statechart-st-example-build PerformanceCustom |
---|
72 | : Performance : Performance : $(custom) ] |
---|
73 | [ statechart-st-example-build PerformanceNative |
---|
74 | : Performance : Performance : $(native) ] |
---|
75 | : <install-dependencies>on <install-type>EXE <install-type>SHARED_LIB ; |
---|