ALSA lib编译
http://blog.sina.com.cn/s/blog_7d7e9d0f0101lqlp.html
alsa lib:
#!bin/sh rm -rf ./output/* mkdir -p ./output chmod -R 777 ./output OUTPUT_PATH=`pwd`/output make clean make distclean export CROSS_COMPILER="" export CC=${CROSS_COMPILER}gcc export LD=${CROSS_COMPILER}ld export AR=${CROSS_COMPILER}ar
export NM=${CROSS_COMPILER}nm
export STRIP=${CROSS_COMPILER}strip export CFLAGS="-DPIC" ./configure --prefix=/usr --enable-shared -with-pcm-plugins=all --with-ctl-plugins=all make make DESTDIR=${OUTPUT_PATH} install
如果是交叉编译,需要指定CROSS_COMPILER 和host,例如:
export CROSS_COMPILER="arm-linux-gneabihf-"
./configure --prefix=/usr --host=arm-linux-gneabihf --build=x86_64 --enable-shared -with-pcm-plugins=all --with-ctl-plugins=all
ALSA utils:
#!bin/sh rm -rf ./output/* mkdir -p ./output chmod -R 777 ./output OUTPUT_PATH=`pwd`/output ALSA_INC_PATH=/home/fellow/alsa-lib-1.2.2/output/usr/include ALSA_LIB_PATH=/home/fellow/alsa-lib-1.2.2/output/usr/lib make clean make distclean export CROSS_COMPILER="" export CC=${CROSS_COMPILER}gcc export LD=${CROSS_COMPILER}ld export AR=${CROSS_COMPILER}ar export NM=${CROSS_COMPILER}nm export STRIP=${CROSS_COMPILER}strip
./configure--prefix=/usr --with-alsa-inc-prefix=${ALSA_INC_PATH} --with-alsa-prefix=${ALSA_LIB_PATH} --disable-alsamixer --disable-xmlto make make DESTDIR=${OUTPUT_PATH} install
ALSA plugins:
#!bin/sh rm -rf ./output/* mkdir -p ./output chmod -R 777 ./output OUTPUT_PATH=`pwd`/output ALSA_INC_PATH=/home/fellow/alsa-lib-1.2.2/output/usr/include ALSA_LIB_PATH=/home/fellow/alsa-lib-1.2.2/output/usr/lib make clean make distclean export CROSS_COMPILER="" export CC=${CROSS_COMPILER}gcc export LD=${CROSS_COMPILER}ld export AR=${CROSS_COMPILER}ar export NM=${CROSS_COMPILER}nm export STRIP=${CROSS_COMPILER}strip export PKG_CONFIG_PATH=${ALSA_LIB_PATH}/pkgconfig export CFLAGS="-I${ALSA_INC_PATH}" export LDFLAGS="-L${ALSA_LIB_PATH} -lasound" ./configure --prefix=/usr make make DESTDIR=${OUTPUT_PATH} install