您的位置:首页 > 其它

MP3播放器madplay在ARM平台上的移植

2006-12-02 13:31 537 查看
准备:
下载下面的源代码包
{ libid3tag, libmad,madplay}
http://sourceforge.net/project/showfiles.php?group_id=12349
{ zlib: needed by libid3tag }
http://www.zlib.net/zlib-1.2.3.tar.gz
1.
编译zlib 因为libid3tag需要这个库
./configure --prefix=/usr/local/arm/2.95.3/arm-linux
修改Makefile
AR=/usr/local/arm/2.95.3/bin/arm-linux-ar rc
CC=/usr/local/arm/2.95.3/bin/arm-linux-gcc
RANLIB=/usr/local/arm/2.95.3/bin/arm-linux-ranlib
make
make install

2.
编译libid3tag
./configure --host=arm-linux CC=arm-linux-gcc --disable-debugging --disable-shared --prefix=/usr/local/arm/2.95.3/arm-linux
make
make install

3.
编译libmad
./configure --enable-fpm=arm --host=arm-linux --disable-shared --disable-debugging --prefix=/usr/local/arm/2.95.3/arm-linux CC=arm-linux-gcc
make
make install

4.
编译madplay
./configure --host=arm-linux CC=arm-linux-gcc --disable-debugging --disable-shared
make
但是,这样得到的是动态连接的。
rm madplay
拷贝make的最后一个连接的命令,在最后加上-static,然后运行,得到静态连接的程序
(动态连接的话在ARM板上运行不起来)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: