1#!/bin/bash 2 3# Cross-compiling to ARM. Note: only compiles in OGG and MP3 support 4# if the ARM libraries are already setup within libs/, otherwise omits 5# them. To build the libraries, see the 'mk-libmad-linux-xarm' and 6# 'mk-tremor-linux-xarm' scripts. Good luck!!! 7 8CC=/usr/local/arm/2.95.3/bin/arm-linux-gcc 9 10OPT='-DT_LINUX -Wall -O3 -s -lm -lpthread' 11LIBS='' 12 13[ -f libs/linux-arm-libmad.a ] && { 14 OPT="-DMP3_DECODE $OPT" 15 LIBS="$LIBS libs/linux-arm-libmad.a" 16} 17[ -f libs/linux-arm-libvorbisidec.a ] && { 18 OPT="-DOGG_DECODE $OPT" 19 LIBS="$LIBS libs/linux-arm-libvorbisidec.a" 20} 21 22echo $CC $OPT sbagen.c $LIBS -o sbagen 23$CC $OPT sbagen.c $LIBS -o sbagen || exit 1 24 25