第三方库交叉移植时,一般需要设置的参数
编译器
CC=
编译后的文件路径
--prefix=
链接的库路径
LDFLAGS=-L
链接的库的头文件路径
CPPFLAGS=-I
--enable-shared
--disable-shared
--enable-static
--disable-static
1.zlib-1.1.4
export CC=mipsel-openwrt-linux-gcc
./configure --prefix=/home/zhihao/work_place/madplay/madplay_mipsel
2.
libid3tag-0.15.1b
export CC=mipsel-openwrt-linux-gcc
./configure CC=mipsel-openwrt-linux-gcc --prefix=/home/zhihao/work_place/madplay/madplay_mipsel --host=mips-linux --disable-shared --enable-static CPPFLAGS=-I/home/zhihao/work_place/madplay/madplay_mipsel/include LDFLAGS=-L/home/zhihao/work_place/madplay/madplay_mipsel/lib
make && make install
3.libmad
./configure CC=mipsel-openwrt-linux-gcc --prefix=/home/zhihao/work_place/madplay/madplay_mipsel --host=mips-linux --disable-shared --enable-static CPPFLAGS=-I/home/zhihao/work_place/madplay/madplay_mipsel/include LDFLAGS=-L/home/zhihao/work_place/madplay/madplay_mipsel/lib
4.madplay
./configure CC=mipsel-openwrt-linux-gcc --prefix=/home/zhihao/work_place/madplay/madplay_mipsel --host=mips-linux --disable-shared --enable-static CPPFLAGS=-I/home/zhihao/work_place/madplay/madplay_mipsel/include LDFLAGS=-L/home/zhihao/work_place/madplay/madplay_mipsel/lib
make && make install
5.读取依赖库
mipsel-openwrt-linux-readelf -d madplay
/home/zhihao/work_place/madplay/madplay_mipsel
--disable-shared --enable-static