mirror of
https://github.com/boostorg/statechart.git
synced 2026-02-02 21:22:09 +00:00
86 lines
3.2 KiB
Plaintext
86 lines
3.2 KiB
Plaintext
##############################################################################
|
|
# (c) Copyright Andreas Huber Doenni 2004-2005
|
|
# Distributed under the Boost Software License, Version 1.0. (See accompany-
|
|
# ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
##############################################################################
|
|
|
|
subproject libs/statechart/example ;
|
|
|
|
local no-of-bits-list = 1 2 3 ;
|
|
|
|
# Some platforms have either problems with the automatic detection of the
|
|
# threading mode (e.g. vc-7_1 & gcc >= 3.4.0) or don't support single-
|
|
# threaded mode (e.g. vc-8_0). We therefore manually turn MT off here
|
|
local st-requirements = <threading>single <define>BOOST_DISABLE_THREADS ;
|
|
|
|
template statechart-common-options
|
|
:
|
|
: <include>$(BOOST_ROOT)
|
|
# The library ensures that all state destructors are only invoked on
|
|
# the most-derived type, therefore state destructors do not need to
|
|
# be virtual
|
|
<gcc><*><cxxflags>-Wno-non-virtual-dtor
|
|
<gcc-stlport><*><cxxflags>-Wno-non-virtual-dtor
|
|
<gcc-nocygwin><*><cxxflags>-Wno-non-virtual-dtor
|
|
<mingw><*><cxxflags>-Wno-non-virtual-dtor
|
|
<mingw-stlport><*><cxxflags>-Wno-non-virtual-dtor ;
|
|
|
|
rule statechart-st-example-build (
|
|
name : directory : cpp-sources + : requirements * )
|
|
{
|
|
exe $(name)
|
|
: $(directory)/$(cpp-sources).cpp <template>statechart-common-options
|
|
: $(st-requirements) $(requirements) ;
|
|
|
|
return <exe>$(name) ;
|
|
}
|
|
|
|
rule statechart-mt-example-build (
|
|
name : directory : cpp-sources + : requirements * )
|
|
{
|
|
exe $(name)
|
|
: $(directory)/$(cpp-sources).cpp <dll>../../thread/build/boost_thread
|
|
<template>statechart-common-options
|
|
: <threading>multi $(requirements) ;
|
|
|
|
return <exe>$(name) <dll>../../thread/build/boost_thread ;
|
|
}
|
|
|
|
rule statechart-bitmachine-build ( tag : requirements * )
|
|
{
|
|
local result ;
|
|
|
|
for local no-of-bits in $(no-of-bits-list)
|
|
{
|
|
result +=
|
|
[ statechart-st-example-build BitMachine$(tag)$(no-of-bits)
|
|
: BitMachine : BitMachine
|
|
: <define>NO_OF_BITS=$(no-of-bits) $(requirements) ] ;
|
|
}
|
|
|
|
return $(result) ;
|
|
}
|
|
|
|
stage run
|
|
: [ statechart-bitmachine-build Normal ]
|
|
[ statechart-bitmachine-build Custom
|
|
: <define>CUSTOMIZE_MEMORY_MANAGEMENT ]
|
|
[ statechart-bitmachine-build Native
|
|
: <define>BOOST_STATECHART_USE_NATIVE_RTTI ]
|
|
[ statechart-st-example-build Camera
|
|
: Camera : Camera Configuring Main Shooting ]
|
|
[ statechart-st-example-build Handcrafted : Handcrafted : Handcrafted ]
|
|
[ statechart-st-example-build KeyboardNormal : Keyboard : Keyboard ]
|
|
[ statechart-st-example-build KeyboardNative : Keyboard : Keyboard
|
|
: <define>BOOST_STATECHART_USE_NATIVE_RTTI ]
|
|
[ statechart-st-example-build PingPongSingle : PingPong : PingPong
|
|
: <define>CUSTOMIZE_MEMORY_MANAGEMENT ]
|
|
[ statechart-mt-example-build PingPongMulti1 : PingPong : PingPong
|
|
: <define>CUSTOMIZE_MEMORY_MANAGEMENT ]
|
|
[ statechart-mt-example-build PingPongMulti2 : PingPong : PingPong
|
|
: <define>CUSTOMIZE_MEMORY_MANAGEMENT <define>USE_TWO_THREADS ]
|
|
[ statechart-st-example-build StopWatch : StopWatch : StopWatch ]
|
|
[ statechart-st-example-build StopWatch2 : StopWatch : StopWatch2 ]
|
|
: common-variant-tag
|
|
<target>stage
|
|
<target>all ; |