fs4412开发板学习笔记(十二)

移植madplayer:
1.资源准备
(1)下载madplayer
http://madplay.sourcearchive.com/

wget http://madplay.sourcearchive.com/downloads/0.15.2b/madplay_0.15.2b.orig.tar.gz
(2)下载zlib
http://www.zlib.net/
(3)下载Libid3tag  
http://cblfs.cross-lfs.org/index.php/Libid3tag
(4)下载libmad
http://www.linuxfromscratch.org/blfs/view/6.3/multimedia/libmad.html

2.配置编译
公共库目录设为:/home/linux/workdir/mdplay/_install
(1)zlib
#cd zlib-1.2.8
#./configure --prefix=/home/linux/workdir/mdplay/_install
#vim Makfile
CC=arm-none-linux-gnueabi-gcc
AR=/usr/local/toolchain/toolchain-4.6.4/bin/arm-none-linux-gnueabi-ar
RANLIB=/usr/local/toolchain/toolchain-4.6.4/bin/arm-none-linux-gnueabi-ranlib 
LDSHARED=arm-none-linux-gnueabi-gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map
#make 
# make install

(2)Libid3tag 
#cd libid3tag-0.15.1b
./configure --prefix=/home/linux/workdir/mdplay/_install --host=arm-linux CC=arm-none-linux-gnueabi-gcc --disable-debugging --disable-shared  CPPFLAGS=-I/home/linux/workdir/mdplay/_install/include LDFLAGS=-L/home/linux/workdir/mdplay/_install/lib
#make 
#make install

(3)libmad
#cd libmad-0.15.1b
./configure --prefix=/home/linux/workdir/mdplay/_install --host=arm-linux CC=arm-none-linux-gnueabi-gcc --disable-debugging --disable-shared  CPPFLAGS=-I/home/linux/workdir/mdplay/_install/include LDFLAGS=-L/home/linux/workdir/mdplay/_install/lib
#vim Makefile
将第129行中的  -fforce-mem  删除,重新make && make install 即可
#make && make install

(4)madplayer
#cd madplay-0.15.2b
./configure --prefix=/${PWD}/_install --host=arm-linux  CC=arm-none-linux-gnueabi-gcc --enable-static CPPFLAGS=-I/home/linux/workdir/mdplay/_install/include LDFLAGS=-L/home/linux/workdir/mdplay/_install/lib
#make 

#rm madplay
拷贝make的最后一个连接的命令,在最后加上-static 和 -lz,然后运行,得到静态连接的程序
arm-none-linux-gnueabi-gcc -Wall -g -O2 -o madplay madplay.o getopt.o getopt1.o version.o resample.o filter.o tag.o crc.o rgain.o player.o audio.o audio_aiff.o audio_cdda.o audio_hex.o audio_null.o audio_raw.o audio_snd.o audio_wave.o audio_oss.o  -L/home/linux/workdir/mdplay/_install/lib /home/linux/workdir/mdplay/_install/lib/libmad.a /home/linux/workdir/mdplay/_install/lib/libid3tag.a -lz -lm -static

#make install
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值