#!/bin/ksh

set -e
set -u

make dom_node domain=as2
make dom_node domain=exp

cp examples/bridge.clr system/color/
cp examples/datatype.clr system/color/
cp examples/registry.clr system/color/

cp examples/domain.exp exp/color/domain.clr
cp examples/domain.as2 as2/color/domain.clr

make bridge_skel domain=exp
make bridge_skel domain=as2
make bridge_skel domain=as2 ee=TIM
make gen_all

cp as2/skel/*.c as2/user/source
cp system/skel/*.h system/user/include
cp system/skel/*.c system/user/source

# The following files are bridging enhancements that allow
# the autosampler to run farther by stubbing out the PIOs.
cp examples/CARPIO_bridge.c system/user/source
cp examples/SPPIO_bridge.c system/user/source
cp examples/TIM_bridge.c system/user/source

make all
