2010-05-12 01:44:00 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2010-06-01 23:34:43 +08:00
|
|
|
if [ $# -gt 0 ] ; then
|
2013-08-21 22:52:15 +08:00
|
|
|
base=`basename $1 .c`
|
|
|
|
echo "compiling $base"
|
|
|
|
gcc -ggdb `pkg-config opencv --cflags --libs` $base.c -o $base
|
2010-05-12 01:44:00 +08:00
|
|
|
else
|
2013-08-21 22:52:15 +08:00
|
|
|
for i in *.c; do
|
|
|
|
echo "compiling $i"
|
|
|
|
gcc -ggdb `pkg-config --cflags opencv` -o `basename $i .c` $i `pkg-config --libs opencv`;
|
|
|
|
done
|
|
|
|
for i in *.cpp; do
|
|
|
|
echo "compiling $i"
|
|
|
|
g++ -ggdb `pkg-config --cflags opencv` -o `basename $i .cpp` $i `pkg-config --libs opencv`;
|
|
|
|
done
|
2010-05-12 01:44:00 +08:00
|
|
|
fi
|