crashtest-r0ket/firmware/modules/mkwrapper
2011-06-19 21:01:00 +02:00

26 lines
355 B
Bash
Executable file

#!/bin/sh
for a in $* ; do
base=${a%.o}
echo "void module_$base(void);"
echo "void tick_$base(void);"
done
echo
echo "void wrapper(void){"
for a in $* ; do
base=${a%.o}
echo "module_$base();"
done
echo "}"
echo "void tick_wrapper(void){"
for a in $* ; do
base=${a%.o}
grep -q \ tick_$base ${base}.c && echo "tick_$base();"
done
echo "}"