Merge "examples: use I420 input for encoders"
[libvpx.git] / build / make / armlink_adapter.sh
blobdcaa82ca65173fea1f851a5806665ade93fb5dbf
1 #!/bin/bash
2 ##
3 ## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
4 ##
5 ## Use of this source code is governed by a BSD-style license and patent
6 ## grant that can be found in the LICENSE file in the root of the source
7 ## tree. All contributing project authors may be found in the AUTHORS
8 ## file in the root of the source tree.
9 ##
12 verbose=0
13 set -- $*
14 for i; do
15 if [ "$i" == "-o" ]; then
16 on_of=1
17 elif [ "$i" == "-v" ]; then
18 verbose=1
19 elif [ "$on_of" == "1" ]; then
20 outfile=$i
21 on_of=0
22 elif [ -f "$i" ]; then
23 infiles="$infiles $i"
24 elif [ "${i:0:2}" == "-l" ]; then
25 libs="$libs ${i#-l}"
26 elif [ "${i:0:2}" == "-L" ]; then
27 libpaths="${libpaths} ${i#-L}"
28 else
29 args="${args} ${i}"
31 shift
32 done
34 # Absolutize library file names
35 for f in $libs; do
36 found=0
37 for d in $libpaths; do
38 [ -f "$d/$f" ] && infiles="$infiles $d/$f" && found=1 && break
39 [ -f "$d/lib${f}.so" ] && infiles="$infiles $d/lib${f}.so" && found=1 && break
40 [ -f "$d/lib${f}.a" ] && infiles="$infiles $d/lib${f}.a" && found=1 && break
41 done
42 [ $found -eq 0 ] && infiles="$infiles $f"
43 done
44 for d in $libpaths; do
45 [ -n "$libsearchpath" ] && libsearchpath="${libsearchpath},"
46 libsearchpath="${libsearchpath}$d"
47 done
49 cmd="armlink $args --userlibpath=$libsearchpath --output=$outfile $infiles"
50 [ $verbose -eq 1 ] && echo $cmd
51 $cmd