2011-09-14 15:54:34 +02:00
|
|
|
#!/bin/bash
|
|
|
|
HEPTC=../../heptc
|
2011-10-04 11:30:09 +02:00
|
|
|
HEPTC_OPTIONS="-tomato"
|
2011-09-14 15:54:34 +02:00
|
|
|
|
|
|
|
GCC=gcc
|
|
|
|
GCC_OPTIONS="-g -O2 -std=c99 -I ../../../lib/c"
|
|
|
|
|
|
|
|
VERBOSE=1
|
|
|
|
|
|
|
|
interfaces=(mctypes.epi)
|
|
|
|
ext_libs=(mc_ext.epi mathext.epi)
|
2011-09-15 17:20:49 +02:00
|
|
|
sources=(mcinlined.ept)
|
2011-09-14 15:54:34 +02:00
|
|
|
|
|
|
|
for f in ${interfaces[@]}; do
|
|
|
|
if [ $VERBOSE ] ; then
|
|
|
|
echo "**** Compiling interface: $f *******"
|
|
|
|
fi
|
|
|
|
$HEPTC $HEPTC_OPTIONS -target c $f
|
|
|
|
done
|
|
|
|
|
|
|
|
for f in ${ext_libs[@]}; do
|
|
|
|
if [ $VERBOSE ] ; then
|
|
|
|
echo "**** Compiling external lib: $f *******"
|
|
|
|
fi
|
|
|
|
$HEPTC $HEPTC_OPTIONS $f
|
|
|
|
done
|
|
|
|
|
|
|
|
for f in ${sources[@]}; do
|
|
|
|
if [ $VERBOSE ] ; then
|
|
|
|
echo "**** Compiling source file: $f *******"
|
|
|
|
fi
|
|
|
|
$HEPTC $HEPTC_OPTIONS -target c $f
|
|
|
|
done
|
|
|
|
|
2011-09-15 17:20:49 +02:00
|
|
|
#$HEPTC $HEPTC_OPTIONS -target c -s dv_fighterdebug mcinlined.ept
|
2011-09-14 15:54:34 +02:00
|
|
|
|
2011-09-15 17:20:49 +02:00
|
|
|
source_dirs=(mctypes_c mcinlined_c)
|
2011-09-14 15:54:34 +02:00
|
|
|
other_files=(main.c mathext.c mathext.h mc_ext.c mc_ext.h)
|
|
|
|
if [ -d _build ]; then
|
|
|
|
rm -r _build
|
|
|
|
fi
|
|
|
|
mkdir _build
|
|
|
|
cd _build
|
|
|
|
|
|
|
|
for f in ${source_dirs[@]}; do
|
|
|
|
cp ../$f/* .
|
|
|
|
done
|
|
|
|
for f in ${other_files[@]}; do
|
|
|
|
cp ../$f .
|
|
|
|
done
|
|
|
|
|
|
|
|
$GCC $GCC_OPTIONS *.c -o mission_control
|
|
|
|
|
|
|
|
cp mission_control ..
|
|
|
|
|
|
|
|
cd ..
|