Some work on the build script for examples

master
Cédric Pasteur 13 years ago
parent 2fb27770b8
commit 5e39091321

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
HEPTC=../../heptc HEPTC=../../heptc
HEPTC_OPTIONS="" HEPTC_OPTIONS="-tomato"
GCC=gcc GCC=gcc
GCC_OPTIONS="-g -O2 -std=c99 -I ../../../lib/c" GCC_OPTIONS="-g -O2 -std=c99 -I ../../../lib/c"

@ -9,7 +9,7 @@ VERBOSE=1
interfaces=(typeBase.epi typeTracks.epi typeArray.epi cstArrayInit.epi cstBaseInit.epi cstPhysics.epi cstTracksInit.epi mc_TypeInputs.epi mc_TypeLists.epi mc_TypeSensors.epi) interfaces=(typeBase.epi typeTracks.epi typeArray.epi cstArrayInit.epi cstBaseInit.epi cstPhysics.epi cstTracksInit.epi mc_TypeInputs.epi mc_TypeLists.epi mc_TypeSensors.epi)
ext_libs=(mc_ext.epi mathext.epi) ext_libs=(mc_ext.epi mathext.epi)
sources=(math.ept trackslib.ept digital.ept mc.ept dv.ept verif.ept debug.ept) sources=(math.ept trackslib.ept digital.ept mc.ept verif.ept dv.ept debug.ept)
exit_if_failed() { exit_if_failed() {
if [ $? != 0 ]; then if [ $? != 0 ]; then

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
HEPTC=../../heptc HEPTC=../../heptc
HEPTC_OPTIONS=-memalloc HEPTC_OPTIONS=""
GCC=gcc GCC=gcc
GCC_OPTIONS="-g -O2 -std=c99 -I ../../../lib/c" GCC_OPTIONS="-g -O2 -std=c99 -I ../../../lib/c"
@ -11,11 +11,18 @@ interfaces=(typeBase.epi typeTracks.epi typeArray.epi cstArrayInit.epi cstBaseIn
ext_libs=(mc_ext.epi mathext.epi) ext_libs=(mc_ext.epi mathext.epi)
sources=(math.ept trackslib.ept digital.ept mc.ept dv.ept verif.ept debug.ept) sources=(math.ept trackslib.ept digital.ept mc.ept dv.ept verif.ept debug.ept)
exit_if_failed() {
if [ $? != 0 ]; then
exit $?
fi
}
for f in ${interfaces[@]}; do for f in ${interfaces[@]}; do
if [ $VERBOSE ] ; then if [ $VERBOSE ] ; then
echo "**** Compiling interface: $f *******" echo "**** Compiling interface: $f *******"
fi fi
$HEPTC $HEPTC_OPTIONS -target c $f $HEPTC $HEPTC_OPTIONS -target c $f
exit_if_failed
done done
for f in ${ext_libs[@]}; do for f in ${ext_libs[@]}; do
@ -23,6 +30,7 @@ for f in ${ext_libs[@]}; do
echo "**** Compiling external lib: $f *******" echo "**** Compiling external lib: $f *******"
fi fi
$HEPTC $HEPTC_OPTIONS $f $HEPTC $HEPTC_OPTIONS $f
exit_if_failed
done done
for f in ${sources[@]}; do for f in ${sources[@]}; do
@ -30,6 +38,7 @@ for f in ${sources[@]}; do
echo "**** Compiling source file: $f *******" echo "**** Compiling source file: $f *******"
fi fi
$HEPTC $HEPTC_OPTIONS -target c $f $HEPTC $HEPTC_OPTIONS -target c $f
exit_if_failed
done done
#$HEPTC $HEPTC_OPTIONS -target c -s dv_fighterdebug debug.ept #$HEPTC $HEPTC_OPTIONS -target c -s dv_fighterdebug debug.ept
@ -50,7 +59,8 @@ for f in ${other_files[@]}; do
done done
$GCC $GCC_OPTIONS *.c -o mission_control $GCC $GCC_OPTIONS *.c -o mission_control
exit_if_failed
cp mission_control .. cp mission_control ..
cd .. cd ..

Loading…
Cancel
Save