crashtest-r0ket/firmware/applications/mkwrapper

42 lines
645 B
Plaintext
Raw Permalink Normal View History

#!/bin/sh
for a in $* ; do
case $a in
loadable_*) continue;;
2011-08-03 22:12:11 +00:00
l0dable_*) continue;;
*/*) continue;;
esac
base=${a%.o}
echo "void main_$base(void);"
echo "void tick_$base(void);"
done
echo
echo "void wrapper(void){"
for a in $* ; do
case $a in
loadable_*) continue;;
2011-08-03 22:12:11 +00:00
l0dable_*) continue;;
*/*) continue;;
esac
base=${a%.o}
echo "main_$base();"
done
echo "}"
echo "void tick_wrapper(void){"
for a in $* ; do
case $a in
loadable_*) continue;;
2011-08-03 22:12:11 +00:00
l0dable_*) continue;;
*/*) continue;;
esac
base=${a%.o}
grep -q \ tick_$base ${base}.c && echo "tick_$base();"
done
echo "}"