交叉编译xvid

来源:互联网 发布:天地图数据融合2017 编辑:程序博客网 时间:2024/04/29 12:02
 

[root@DeebugFedoraPC generic]# ./configure --prefix=/usr/local/arm/4.3.2/arm-none-linux-gnueabi/ --disable-assembly

checking build system type... i686-pc-linux-gnu

checking host system type... i686-pc-linux-gnu

checking target system type... i686-pc-linux-gnu

checking whether to use default CFLAGS... yes

checking for gcc... gcc

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables... 

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ANSI C... none needed

checking for a BSD-compatible install... /usr/bin/install -c

checking for ranlib... ranlib

checking for whether to use assembly code... no

checking how to run the C preprocessor... gcc -E

checking for egrep... grep -E

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking for int *... yes

checking size of int *... 4

checking whether byte ordering is bigendian... no

checking for build extensions... .so .a .o

checking for platform specific LDFLAGS/CFLAGS... ok

checking stdio.h usability... yes

checking stdio.h presence... yes

checking for stdio.h... yes

checking signal.h usability... yes

checking signal.h presence... yes

checking for signal.h... yes

checking for stdlib.h... (cached) yes

checking for string.h... (cached) yes

checking assert.h usability... yes

checking assert.h presence... yes

checking for assert.h... yes

checking math.h usability... yes

checking math.h presence... yes

checking for math.h... yes

configure: creating ./config.status

config.status: creating platform.inc

[root@DeebugFedoraPC generic]# 

      

[root@DeebugFedoraPC generic]# vi platform.inc

     31 # deebug modify for opencv

     32 CC=arm-linux-gcc

     33 SPECIFIC_CFLAGS=-fPIC

     34 CFLAGS=-Wall -O2 -fstrength-reduce -finline-functions -ffast-math -fomit        -frame-pointer

 

[root@DeebugFedoraPC generic]# make

  D: =build

  C: ./decoder.c

  C: ./encoder.c

  C: ./xvid.c

  C: bitstream/bitstream.c

  C: bitstream/cbp.c

  C: bitstream/mbcoding.c

  C: dct/fdct.c

  C: dct/idct.c

  C: dct/simple_idct.c

  C: image/colorspace.c

  C: image/image.c

  C: image/interpolate8x8.c

  C: image/font.c

  C: image/postprocessing.c

  C: image/qpel.c

  C: image/reduced.c

  C: motion/estimation_bvop.c

  C: motion/estimation_common.c

  C: motion/estimation_gmc.c

  C: motion/estimation_pvop.c

  C: motion/estimation_rd_based.c

  C: motion/estimation_rd_based_bvop.c

  C: motion/gmc.c

  C: motion/motion_comp.c

  C: motion/vop_type_decision.c

  C: motion/sad.c

  C: prediction/mbprediction.c

  C: plugins/plugin_single.c

  C: plugins/plugin_2pass1.c

  C: plugins/plugin_2pass2.c

  C: plugins/plugin_lumimasking.c

  C: plugins/plugin_dump.c

  C: plugins/plugin_psnr.c

  C: quant/quant_h263.c

  C: quant/quant_matrix.c

  C: quant/quant_mpeg.c

  C: utils/emms.c

  C: utils/mbtransquant.c

  C: utils/mem_align.c

  C: utils/mem_transfer.c

  C: utils/timer.c

  L: libxvidcore.a

  L: libxvidcore.so.4.1

 

---------------------------------------------------------------

 XviD has been successfully built.

 

 * Binaries are currently located in the '=build' directory

 * To install them on your system, you can run '# make install'

   as root.

---------------------------------------------------------------

 

[root@DeebugFedoraPC generic]# 

 

[root@DeebugFedoraPC generic]# make install

  D: /usr/local/arm/4.3.2/arm-none-linux-gnueabi//lib

  I: /usr/local/arm/4.3.2/arm-none-linux-gnueabi//lib/libxvidcore.so.4.1

  I: /usr/local/arm/4.3.2/arm-none-linux-gnueabi//lib/libxvidcore.a

  D: /usr/local/arm/4.3.2/arm-none-linux-gnueabi//include

  I: /usr/local/arm/4.3.2/arm-none-linux-gnueabi//include/xvid.h

[root@DeebugFedoraPC generic]# 

 

这里可以在交叉编译链目录/usr/local/arm/4.3.2/arm-none-linux-gnueabi/的include,lib下生成相应的头文件和库文件

[root@DeebugFedoraPC examples]# ls /usr/local/arm/4.3.2/arm-none-linux-gnueabi/lib

armv4t      libjpeg.so         libx264.a      libxvidcore.so.4.1

boards      libjpeg.so.62      libx264.so     libyasm.a

ldscripts   libjpeg.so.62.0.0  libx264.so.49  pkgconfig

libjpeg.la  libsupc++.a        libxvidcore.a  thumb2

[root@DeebugFedoraPC examples]# ls /usr/local/arm/4.3.2/arm-none-linux-gnueabi/include/

c++        jerror.h    jpeglib.h  libyasm.h         x264.h

jconfig.h  jmorecfg.h  libyasm    libyasm-stdint.h  xvid.h

[root@DeebugFedoraPC examples]# 


进入example文件夹测试,输入
arm-linux-gcc -o xvid_encraw xvid_encraw.c  -lc -lm -I../src/ -L../build/generic/=build -lxvidcore
即可生成xvid_encraw

[root@DeebugFedoraPC examples]# arm-linux-gcc -o xvid_encraw xvid_encraw.c  -lc -lm -I../src/ -L../build/generic/=build -lxvidcore

[root@DeebugFedoraPC examples]# ls

bench_list.pl  cactus.pgm.bz2  README        xvid_decraw.c  xvid_encraw.c

bench.pl       Makefile        xvid_bench.c  xvid_encraw

[root@DeebugFedoraPC examples]# 

 

deebug
20140225
ccnu 


0 0