| @@ -1,19 +1,20 @@ |
| 1 | 1 | #!/bin/bash |
| 2 | 2 | |
| 3 | | −usage="this file must located in ../testbin/ based on our code structure " |
| 4 | | −echo $usage |
| 3 | +CurDir="${PWD}" |
| 5 | 4 | |
| 6 | | −CurDir=`pwd` |
| 7 | | −EncoderMakeDir="../codec/build/linux/enc/" |
| 8 | | −DecoderMakeDir="../codec/build/linux/dec/" |
| 9 | | −VPMakeDir="../processing/build/linux/" |
| 5 | +if [ "$(basename ${CurDir})" != "testbin" ]; then |
| 6 | + usage="This file must located in ../testbin/ based on our code structure" |
| 7 | + echo ${usage} |
| 8 | + exit 1 |
| 9 | +fi |
| 10 | + |
| 11 | +EncoderMakeDir="../codec/build/linux/enc" |
| 12 | +DecoderMakeDir="../codec/build/linux/dec" |
| 13 | +VPMakeDir="../processing/build/linux" |
| 10 | 14 | |
| 11 | | −CodecBinDir="../codec/build/linux/bin/" |
| 15 | +CodecBinDir="../codec/build/linux/bin" |
| 12 | 16 | VPBinDir="../bin/linux" |
| 13 | 17 | |
| 14 | | −let "EncoderBuildFlag=1" |
| 15 | | −let "DecoderBuildFlag=1" |
| 16 | | −let "VPBuildFlag=1" |
| 17 | 18 | MakefileLogFile="${CurDir}/CodecVPBuild.log" |
| 18 | 19 | |
| 19 | 20 | #************************************************ |
| @@ -25,26 +26,10 @@ make >>${MakefileLogFile} · 5 unmodified lines |
| 25 | 26 | |
| 26 | 27 | cd ${CurDir} |
| 27 | 28 | cd ${CodecBinDir} |
| 28 | | −if [ ! -e welsenc.a ] |
| 29 | | −then |
| 30 | | − let "EncoderBuildFlag=0" |
| 31 | | −fi |
| 32 | | − |
| 33 | | −if [ ! -e welsenc.so ] |
| 34 | | −then |
| 35 | | − let "EncoderBuildFlag=0" |
| 36 | | −fi |
| 37 | | − |
| 38 | | −if [ ! -e welsenc.exe ] |
| 39 | | −then |
| 40 | | − let "EncoderBuildFlag=0" |
| 41 | | −fi |
| 42 | | − |
| 43 | | −if [ "$EncoderBuildFlag" -eq 1 ] |
| 44 | | −then |
| 45 | | − echo "encoder build success!" |
| 29 | +if [[ ! -e welsenc.a ]] || [[ ! -e welsenc.so ]] || [[ ! -e welsenc.exe ]]; then |
| 30 | + echo "encoder build failed!" |
| 46 | 31 | else |
| 47 | | − echo "encoder build failed!" |
| 32 | + echo "encoder build success!" |
| 48 | 33 | fi |
| 49 | 34 | |
| 50 | 35 | #************************************************ |
| @@ -57,26 +42,10 @@ make >>${MakefileLogFile} · 6 unmodified lines |
| 57 | 42 | |
| 58 | 43 | cd ${CurDir} |
| 59 | 44 | cd ${CodecBinDir} |
| 60 | | −if [ ! -e welsdec.a ] |
| 61 | | −then |
| 62 | | − let "DecoderBuildFlag=0" |
| 63 | | −fi |
| 64 | | − |
| 65 | | −if [ ! -e welsdec.so ] |
| 66 | | −then |
| 67 | | − let "DecoderBuildFlag=0" |
| 68 | | −fi |
| 69 | | − |
| 70 | | −if [ ! -e welsdec.exe ] |
| 71 | | −then |
| 72 | | − let "DecoderBuildFlag=0" |
| 73 | | −fi |
| 74 | | − |
| 75 | | −if [ "$DecoderBuildFlag" -eq 1 ] |
| 76 | | −then |
| 77 | | − echo "decoder build success!" |
| 45 | +if [[ ! -e welsdec.a ]] || [[ ! -e welsdec.so ]] || [[ ! -e welsdec.exe ]]; then |
| 46 | + echo "decoder build failed!" |
| 78 | 47 | else |
| 79 | | − echo "decoder build failed!" |
| 48 | + echo "decoder build success!" |
| 80 | 49 | fi |
| 81 | 50 | |
| 82 | 51 | #************************************************ |
| @@ -89,40 +58,12 @@ make >>${MakefileLogFile} · 6 unmodified lines |
| 89 | 58 | |
| 90 | 59 | cd ${CurDir} |
| 91 | 60 | cd ${VPBinDir} |
| 92 | | −if [ ! -e libwelsvp.so ] |
| 93 | | −then |
| 94 | | − let "VPBuildFlag=0" |
| 95 | | −fi |
| 96 | | − |
| 97 | | −if [ "$VPBuildFlag" -eq 1 ] |
| 98 | | −then |
| 99 | | − echo "VP build success!" |
| 61 | +if [ ! -e libwelsvp.so ]; then |
| 62 | + echo "VP build failed!" |
| 100 | 63 | else |
| 101 | | − echo "VP build failed!" |
| 64 | + echo "VP build success!" |
| 102 | 65 | fi |
| 103 | 66 | |
| 104 | | − |
| 105 | | −#**************************** |
| 106 | 67 | cd ${CurDir} |
| 107 | | −rm -f *.a *.exe *.so |
| 108 | | − |
| 109 | | −for file in ${CodecBinDir}/* |
| 110 | | −do |
| 111 | | − cp ${file} ./ |
| 112 | | − echo "file ${file} under ../openh264/bin/" |
| 113 | | −done |
| 114 | | − |
| 115 | | −for file in ${VPBinDir}/* |
| 116 | | −do |
| 117 | | − cp ${file} ./ |
| 118 | | − echo "file ${file} under ../openh264/bin/" |
| 119 | | −done |
| 120 | | − |
| 121 | | − |
| 122 | | − |
| 123 | | − |
| 124 | | − |
| 125 | | − |
| 126 | | − |
| 127 | | − |
| 128 | | − |
| 68 | +echo "executables available in ../bin/linux" |
| 69 | +echo "log file stored in ./CodecVPBuild.log" |