交叉编译live555

来自IPTV爱好者
跳转至: 导航搜索

==交叉编译Live555==

 交叉编译Live555其实很简单。
 1、交叉编译环境安装,请参考相关wiki文章。
 2、config文件编写:
 只需将config.armlinux复制稍作修改就行。
     copy config.armlinux config.sh4
    vi config.sh4
         CROSS_COMPILE=		arm-elf-
         COMPILE_OPTS =		$(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_STRSTREAM=1 - 
         D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
         C =			c
         C_COMPILER =		$(CROSS_COMPILE)gcc
         C_FLAGS =		$(COMPILE_OPTS)
         CPP =			cpp
         CPLUSPLUS_COMPILER =	$(CROSS_COMPILE)gcc
         CPLUSPLUS_FLAGS =	$(COMPILE_OPTS) -Wall -DBSD=1
         OBJ =			o
         LINK =			$(CROSS_COMPILE)gcc -o
         LINK_OPTS =		-L.
         CONSOLE_LINK_OPTS =	$(LINK_OPTS)
         LIBRARY_LINK =		$(CROSS_COMPILE)ld -o
         LIBRARY_LINK_OPTS =	$(LINK_OPTS) -r -Bstatic
         LIB_SUFFIX =			a
         LIBS_FOR_CONSOLE_APPLICATION =
         LIBS_FOR_GUI_APPLICATION =
         EXE =  
    只需将第一行的arm-elf- 改成 sh4-linux-uclibc-
    将第十行的gcc 改成 g++ 如下:
           CROSS_COMPILE=		sh4-linux-uclibc-
         COMPILE_OPTS =		$(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_STRSTREAM=1 - 
         D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
         C =			c
         C_COMPILER =		$(CROSS_COMPILE)gcc
         C_FLAGS =		$(COMPILE_OPTS)
         CPP =			cpp
         CPLUSPLUS_COMPILER =	$(CROSS_COMPILE)gcc
         CPLUSPLUS_FLAGS =	$(COMPILE_OPTS) -Wall -DBSD=1
         OBJ =			o
         LINK =			$(CROSS_COMPILE)g++ -o
         LINK_OPTS =		-L.
         CONSOLE_LINK_OPTS =	$(LINK_OPTS)
         LIBRARY_LINK =		$(CROSS_COMPILE)ld -o
         LIBRARY_LINK_OPTS =	$(LINK_OPTS) -r -Bstatic
         LIB_SUFFIX =			a
         LIBS_FOR_CONSOLE_APPLICATION =
         LIBS_FOR_GUI_APPLICATION =
         EXE =  
     保存退出
  3、生成Makefile文件:
     ./genMakefiles sh4
  4、编译:
     make
  5、在mediaServer下找到你要的东东。