export LDFLAGS=-L$ROOTFS_DIR/usr/local/mips/opencv-depend/lib
export CFLAGS=-I$ROOTFS_DIR/usr/local/mips/opencv-depend/include
./configure --host=mips-linux-gnu --prefix=$OPENCV_DEPEND --enable-shared --enable-static
make
仍然出错,提示
pnglibconf.c:33:19: fatal error: zlib.h: No such file or directory
参考http://code-by.org/viewtopic.php?f=55&t=169
vim Makefile +256改为
DEFAULT_INCLUDES = -I. -I/usr/local/mips/opencv-depend/include
make
make install
4、yasm的交叉编译:
CC=mips-linux-gnu-gcc ./configure --enable-shared --host=mips-linux-gnu --disable-asm --prefix=$OPENCV_DEPEND
make
make install
5、libx264的交叉编译:
CC=mips-linux-gnu-gcc ./configure --enable-shared --host=mips-linux-gnu --disable-asm --prefix=$OPENCV_DEPEND
make
make install
6、libxvid的交叉编译:
进入libxvid的目录后,再行进入其子目录中:
cd ./build/generic
然后输入命令:
./configure --prefix=$OPENCV_DEPEND --host=arm-linux --disable-assembly
make
make install