2011-05-21 10:05:48 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
for a in $* ; do
|
2011-07-19 08:01:00 +00:00
|
|
|
case $a in
|
2011-07-19 08:14:54 +00:00
|
|
|
loadable_*) continue;;
|
2011-07-24 00:47:07 +00:00
|
|
|
*/*) continue;;
|
2011-07-19 08:01:00 +00:00
|
|
|
esac
|
2011-05-21 10:05:48 +00:00
|
|
|
base=${a%.o}
|
2011-06-20 21:33:42 +00:00
|
|
|
echo "void main_$base(void);"
|
2011-06-13 21:19:18 +00:00
|
|
|
echo "void tick_$base(void);"
|
2011-05-21 10:05:48 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "void wrapper(void){"
|
|
|
|
|
|
|
|
for a in $* ; do
|
2011-07-19 08:01:00 +00:00
|
|
|
case $a in
|
2011-07-19 08:14:54 +00:00
|
|
|
loadable_*) continue;;
|
2011-07-24 00:47:07 +00:00
|
|
|
*/*) continue;;
|
2011-07-19 08:01:00 +00:00
|
|
|
esac
|
2011-05-21 10:05:48 +00:00
|
|
|
base=${a%.o}
|
2011-06-20 21:33:42 +00:00
|
|
|
echo "main_$base();"
|
2011-05-21 10:05:48 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
echo "}"
|
2011-06-13 21:19:18 +00:00
|
|
|
|
|
|
|
echo "void tick_wrapper(void){"
|
|
|
|
|
|
|
|
for a in $* ; do
|
2011-07-19 08:14:54 +00:00
|
|
|
case $a in
|
|
|
|
loadable_*) continue;;
|
2011-07-24 00:47:07 +00:00
|
|
|
*/*) continue;;
|
2011-07-19 08:14:54 +00:00
|
|
|
esac
|
2011-06-13 21:19:18 +00:00
|
|
|
base=${a%.o}
|
|
|
|
grep -q \ tick_$base ${base}.c && echo "tick_$base();"
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "}"
|