19 lines
359 B
Bash
Executable File
19 lines
359 B
Bash
Executable File
#!/bin/sh
|
|
|
|
opts=""
|
|
libs="$cclibs"
|
|
rm -f hasgot.c
|
|
while : ; do
|
|
case "$1" in
|
|
-i) echo "#include <$2>" >> hasgot.c; shift;;
|
|
-l*|-L*) libs="$libs $1";;
|
|
-*) opts="$opts $1";;
|
|
*) break;;
|
|
esac
|
|
shift
|
|
done
|
|
(echo "main() {"
|
|
for f in $*; do echo " $f();"; done
|
|
echo "}") >> hasgot.c
|
|
exec $cc $opts -o tst hasgot.c $libs > /dev/null 2>/dev/null
|