-
Notifications
You must be signed in to change notification settings - Fork 6
/
mk-libmad-linux-xarm
executable file
·43 lines (31 loc) · 826 Bytes
/
mk-libmad-linux-xarm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# Cross-compilation to ARM. Adjust XBIN below according to your
# cross-compiler location.
#
# This script assumes that you have downloaded the libmad archive and
# unpacked it:
#
# http://www.underbit.com/products/mad/
#
XBIN=/usr/local/arm/2.95.3/bin/
XGCC=$XBIN/arm-linux-gcc
XCPP=$XBIN/cpp
set libmad*
[ -z "$1" ] && {
echo "libmad* directory not found"; exit 1
}
[ ! -z "$2" ] && {
echo "More than one libmad* directory found:"
ls -ld libmad*
exit 1
}
cd $1 || { echo "Can't move to $1 directory"; exit 1; }
./configure --host=arm CC=$XGCC CPP=$XCPP || exit 1
make || exit 1
echo ""
cp -v .libs/libmad.a ../libs/linux-arm-libmad.a || {
echo libmad.a missing; exit 1; }
#cp -v mad.h ../libs/ || {
# echo Header file missing; exit 1; }
make clean >/dev/null 2>&1
echo DONE