Ticket #32528: patch-samples_c_build_all.sh.diff
File patch-samples_c_build_all.sh.diff, 1.1 KB (added by marin.saric@…, 13 years ago) |
---|
-
samples/c/build_all.sh
old new 1 1 #!/bin/sh 2 2 3 3 if [ $# -gt 0 ] ; then 4 base=`basename $1 .c` 5 echo "compiling $base" 6 gcc -ggdb `pkg-config opencv --cflags --libs` $base.c -o $base 4 basec=`basename $1 .c` 5 basecpp=`basename $1 .cpp` 6 base=$basec 7 if ! [ -e $basecpp.cpp ]; then 8 echo "compiling $base" 9 gcc -ggdb `pkg-config opencv --cflags --libs` $base.c -o $base 10 else 11 base=$basecpp 12 echo "compiling $base" 13 g++ -ggdb `pkg-config opencv --cflags --libs` $base.cpp -o $base 14 fi 7 15 else 8 for i in *.c; do 16 for i in *.c; do 17 if [[ $i != '*.c' ]]; then 9 18 echo "compiling $i" 10 19 gcc -ggdb `pkg-config --cflags opencv` -o `basename $i .c` $i `pkg-config --libs opencv`; 11 done 12 for i in *.cpp; do 20 fi 21 done 22 23 for i in *.cpp; do 24 if [[ $i != '*.cpp' ]]; then 13 25 echo "compiling $i" 14 26 g++ -ggdb `pkg-config --cflags opencv` -o `basename $i .cpp` $i `pkg-config --libs opencv`; 15 done 27 fi 28 done 16 29 fi