Chinaunix首页 | 论坛 | 博客
  • 博客访问: 722556
  • 博文数量: 182
  • 博客积分: 2088
  • 博客等级: 大尉
  • 技术积分: 1698
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-16 15:09
个人简介

.

文章分类

全部博文(182)

文章存档

2016年(1)

2015年(18)

2014年(14)

2013年(20)

2012年(129)

分类: 嵌入式

2012-06-15 17:36:40

准备包 madplay-0.15.2b.tar.gz,libmad-0.15.1b.tar.gz,
libid3tag-0.15.1b.tar.gz 和 zlib-1.1.4.tar.gz
编译zlib-1.1.4
首先配置configure 文件
./configure --prefix=/usr/local/mipsel/madplay
修改Makefile.
CC=mipsel-linux-gcc
AR=mipsel-linux-ar rc
RANLIB=mipsel-linux-ranlib

make 
make install

///////////////////////////////////////////////////////////////////////////////
编译libid3tag

./configure CC=mipsel-linux-gcc --host=mipsel-linux --prefix=/usr/local/mipsel/madplay --disable-shared CPPFLAGS=-I/usr/local/mipsel/madplay/include LDFLAGS=-L/usr/local/mipsel/madplay/lib

make 
make install

////////////////////////////////////////////////////////////////////////////////
编译libmad

./configure CC=mipsel-linux-gcc --host=mipsel-linux --prefix=/usr/local/mipsel/madplay --disable-shared CPPFLAGS=-I/usr/local/mipsel/madplay/include LDFLAGS=-L/usr/local/mipsel/madplay/lib

make 
make install

////////////////////////////////////////////////////////////////////////////////
编译madplay

./configure CC=mipsel-linux-gcc --host=mipsel-linux --prefix=/usr/local/mipsel/madplay --disable-shared --enable-static --disable-nls CPPFLAGS=-I/usr/local/mipsel/madplay/include LDFLAGS=-L/usr/local/mipsel/madplay/lib

make
拷贝make的最后一个连接的命令,在最后加上-static,然后运行,得到静态连接的程序,这样就不需要拷贝相应的库了,对于刚开始调试比较方便,等一切都可以Run了后,再使用动态库方式来执行
mipsel-linux-gcc -Wall -O2 -fomit-frame-pointer -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/usr/local/mipsel/madplay/lib /usr/local/mipsel/madplay/lib/libmad.a /usr/local/mipsel/madplay/lib/libid3tag.a -lz -lm -static
__________________________________________________________________________________
在madplay下建立一mp3目录,用于存放编译madplay生成的lib和*.h
编译zlib-1.1.4
首先配置configure 文件
./configure --prefix=/opt/project/uto/madplay/mp3
修改Makefile.
CC=mipsel-linux-gcc
AR=mipsel-linux-ar rc
RANLIB=mipsel-linux-ranlib

make 
make install
///////////////////////////////////////////////////////////////////////////////
编译libid3tag
./configure CC=mipsel-linux-gcc --host=mipsel-linux --prefix=/opt/project/uto/madplay/mp3 --disable-shared CPPFLAGS=-I/opt/project/uto/madplay/mp3/include LDFLAGS=-L/opt/project/uto/madplay/mp3/lib
make 
make install
////////////////////////////////////////////////////////////////////////////////
编译libmad
./configure CC=mipsel-linux-gcc --host=mipsel-linux --prefix=/opt/project/uto/madplay/mp3 --disable-shared CPPFLAGS=-I/opt/project/uto/madplay/mp3/include LDFLAGS=-L/opt/project/uto/madplay/mp3/lib
make 
make install
////////////////////////////////////////////////////////////////////////////////
编译madplay
./configure CC=mipsel-linux-gcc --host=mipsel-linux --prefix=/opt/project/uto/madplay/mp3 --disable-shared --enable-static --disable-nls CPPFLAGS=-I/opt/project/uto/madplay/mp3/include LDFLAGS=-L/opt/project/uto/madplay/mp3/lib
mipsel-linux-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/opt/project/uto/madplay/mp3/lib /opt/project/uto/madplay/mp3/lib/libmad.a /opt/project/uto/madplay/mp3/lib/libid3tag.a -lz -lm -static
阅读(789) | 评论(0) | 转发(0) |
0

上一篇:编译minigui1.3.3 errors

下一篇:madplay使用

给主人留下些什么吧!~~