Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6684356
  • 博文数量: 1159
  • 博客积分: 12444
  • 博客等级: 上将
  • 技术积分: 12570
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-13 21:34
文章分类

全部博文(1159)

文章存档

2016年(126)

2015年(350)

2014年(56)

2013年(91)

2012年(182)

2011年(193)

2010年(138)

2009年(23)

分类: C/C++

2015-10-20 22:54:04


----------------安装pcre-devel
[root@localhost ~]# mount -o loop /opt/CentOS-7-x86_64-Everything-1503-01.iso /mnt/iso/

[root@localhost ~]# ls /mnt/iso/Packages/pcre-*
/mnt/iso/Packages/pcre-8.32-14.el7.i686.rpm          /mnt/iso/Packages/pcre-static-8.32-14.el7.i686.rpm
/mnt/iso/Packages/pcre-8.32-14.el7.x86_64.rpm        /mnt/iso/Packages/pcre-static-8.32-14.el7.x86_64.rpm
/mnt/iso/Packages/pcre-devel-8.32-14.el7.i686.rpm    /mnt/iso/Packages/pcre-tools-8.32-14.el7.x86_64.rpm
/mnt/iso/Packages/pcre-devel-8.32-14.el7.x86_64.rpm

[root@localhost ~]# rpm -ivh /mnt/iso/Packages/pcre-devel-8.32-14.el7.x86_64.rpm

----------------下载android 4.4源码——百度云盘地址

[root@localhost android4.4_source_code]# pwd
/opt/cBPM-android/android4.4_source_code                //android 4.4源码 解压路径

[root@localhost android4.4_source_code]# ls
abi  bionic    build  dalvik      development  docs      frameworks  libcore          Makefile  packages  prebuilts  system      art  bootable  cts    developers  device       external  hardware    libnativehelper  ndk       pdk       sdk        tools

[root@localhost android4.4_source_code]# mkdir -p build/target/product/system/lib

[root@localhost android4.4_source_code]# find . -name envsetup.sh
./external/chromium_org/build/android/envsetup.sh
./build/envsetup.sh                //在build目录下执行. envsetup.sh  (注意,命令前面有一个点,然后接一个“空格”键)
./pdk/apps/CameraITS/build/envsetup.sh

[root@localhost android4.4_source_code]# cd build/
[root@localhost build]# . envsetup.sh
执行完后,就会多出以下几个命令:
- croot:   Changes directory to the top of the tree.
- m:       Makes from the top of the tree.
- mm:      Builds all of the modules in the current directory.    用于当前目录下的工程    
- mmm:     Builds all of the modules in the supplied directories.    用于编译指定目录,如:mmm Settings,表示编译Settings这个目录,之后会生成新的apk
- cgrep:   Greps on all local C/C++ files.
- jgrep:   Greps on all local Java files.
- resgrep: Greps on all local res/*.xml files.
- godir:   Go to the directory containing a file.
- printconfig: 当前build的配置情况

++++++++++++++++++++++++++++
android源码目录下的build/envsetup.sh文件,描述编译的命令
- m:       Makes from the top of the tree.  
- mm:      Builds all of the modules in the current directory.  
- mmm:     Builds all of the modules in the supplied directories.  
要想使用这些命令,首先需要在android源码根目录执行. build/envsetup.sh 脚本设置环境
m:编译所有的模块  
mm:编译当前目录下的模块,当前目录下要有Android.mk文件  
mmm:编译指定路径下的模块,指定路径下要有Android.mk文件  

下面举个例子说明,假设我要编译android下的\hardware\libhardware_legacy\power模块,当前目录为源码根目录,
方法如下:  
1、. build/envsetup.sh  
2、mmm hardware/libhardware_legacy/power/  

或者 :  
1、. build/envsetup.sh  
2、cd hardware/libhardware_legacy/power/  
3、mm
++++++++++++++++++++++++++++
----------------下载lighttpd
[root@localhost cBPM-android]# wget -c
把lighttpd解壓縮到Android source的某個路徑, 比如說 devices/company/external

[root@localhost cBPM-android]# tar xzf lighttpd-1.4.37.tar.gz -C android4.4_source_code/external/
[root@localhost cBPM-android]# cd android4.4_source_code/external/lighttpd-1.4.37/
[root@localhost lighttpd-1.4.37]#

----------------修改lighttpd

参考http://hamer-blog.logdown.com/posts/141723-how-to-port-lighttpd-to-android

[root@localhost lighttpd-1.4.37]# pwd
/opt/cBPM-android/android4.4_source_code/external/lighttpd-1.4.37

----------------编译lighttpd

[root@localhost lighttpd-1.4.37]#

export ANDROID_DIR=/opt/cBPM-android/android4.4_source_code
export PATH=$ANDROID_DIR/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:$PATH

./configure --host=arm-linux CC=arm-linux-androideabi-gcc CPP=arm-linux-androideabi-cpp CFLAGS="-nostdlib" CPPFLAGS="-I${ANDROID_DIR}/bionic/libc/include/ -I${ANDROID_DIR}/bionic/libc/arch-arm/include/ -I${ANDROID_DIR}/bionic/libc/kernel/common/  -I${ANDROID_DIR}/bionic/libc/kernel/common/linux/ -I${ANDROID_DIR}/bionic/libc/kernel/arch-arm -I${ANDROID_DIR}/development/ndk/platforms/android-9/include -I${ANDROID_DIR}/prebuilts/ndk/8/platforms/android-14/arch-arm/usr/include -I${ANDROID_DIR}/external/bison/lib/" LDFLAGS="-Wl,-rpath-link=${ANDROID_DIR}/out/target/product/saturn/system/lib -L${ANDROID_DIR}/out/target/product/saturn/system/lib -L${ANDROID_DIR}/out/target/products/system/lib" --without-bzip2 --without-zlib

[root@localhost lighttpd-1.4.37]# cd /opt/cBPM-android/android4.4_source_code/build/
[root@localhost build]# . envsetup.sh
[root@localhost build]# cd -
/opt/cBPM-android/android4.4_source_code/external/lighttpd-1.4.37
[root@localhost lighttpd-1.4.37]#

利用 mm showcommands or mm -B showcommands 編譯lighttpd, 產生lighttpd, liblighttpd_common.so and 其他plugin modules.

[root@localhost lighttpd-1.4.37]# mm showcommands
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.2.1-1.el7.elrepo.x86_64-x86_64-with-centos-7.1.1503-Core
HOST_BUILD_TYPE=release
BUILD_ID=KRT16M
OUT_DIR=out
============================================
Checking build tools versions...
************************************************************
You are attempting to build with an unsupported JDK.
 
You use OpenJDK but only Sun/Oracle JDK is supported.
Please follow the machine setup instructions at
   
************************************************************
make: 进入目录“/opt/cBPM-android/android4.4_source_code”
build/core/main.mk:152: *** stop。 停止。
make: 离开目录“/opt/cBPM-android/android4.4_source_code”

------------错误原因:
使用的JDK版本不对,这里是openJDK,安卓源码需要Oracle的JDK。
输入java -version看版本就知道了
apt-get remove openjdk*可以卸载openJDK

[root@localhost lighttpd-1.4.37]# java -version
java version "1.7.0_75"
OpenJDK Runtime Environment (rhel-2.5.4.2.el7_0-x86_64 u75-b13)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)

[root@localhost lighttpd-1.4.37]#  rpm -qa | grep java            //先查看

[root@localhost lighttpd-1.4.37]# yum remove java-1.7.0-openjdk
[root@localhost lighttpd-1.4.37]# yum remove java-1.8.0-openjdk
[root@localhost lighttpd-1.4.37]# yum remove java-1.7.0-openjdk-headless
[root@localhost lighttpd-1.4.37]# yum remove java-1.6.0-openjdk-devel
[root@localhost lighttpd-1.4.37]# yum remove java-1.8.0-openjdk-headless
[root@localhost lighttpd-1.4.37]# yum remove java-1.6.0-openjdk

[root@localhost tools]# ls jdk-8u60-linux-x64.rpm
jdk-8u60-linux-x64.rpm
[root@localhost tools]# rpm -ivh jdk-8u60-linux-x64.rpm                //安装
[root@localhost tools]# rpm -qlp jdk-8u60-linux-x64.rpm                //查看安装位置

[root@localhost tools]# gedit /etc/profile
最后添加:
export JAVA_HOME=/usr/java/jdk1.8.0_60
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

[root@localhost tools]# . /etc/profile

[root@localhost lighttpd-1.4.37]# mm showcommands
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.2.1-1.el7.elrepo.x86_64-x86_64-with-centos-7.1.1503-Core
HOST_BUILD_TYPE=release
BUILD_ID=KRT16M
OUT_DIR=out
============================================
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.
 
Your version is: java version "1.8.0_60".
The correct version is: Java SE 1.6.
 
Please follow the machine setup instructions at
   
************************************************************
make: 进入目录“/opt/cBPM-android/android4.4_source_code”
build/core/main.mk:168: *** stop。 停止。
make: 离开目录“/opt/cBPM-android/android4.4_source_code”
[root@localhost lighttpd-1.4.37]#

>>>>>>>>>>>>>>>> 在 下载相应版本 jdk-6u45-linux-x64-rpm.bin
>>>>>>>>>>>>>>>> 安装jdk-6u45-linux-x64-rpm.bin
---------------------------------------------------------------------------------------------------------编译lighttpd-1.4.37 (需要先 完整编译android 4.4源码)
[root@localhost lighttpd-1.4.37]#

[root@localhost android4.4_source_code]#

./configure --host=arm-linux CC=arm-linux-androideabi-gcc CPP=arm-linux-androideabi-cpp CFLAGS="-nostdlib" CPPFLAGS=" -I${ANDROID_DIR}/bionic/libc/include/ -I${ANDROID_DIR}/bionic/libc/include/sys/ -I${ANDROID_DIR}/bionic/libc/arch-arm/include/ -I${ANDROID_DIR}/bionic/libc/kernel/common/  -I${ANDROID_DIR}/bionic/libc/kernel/common/linux/ -I${ANDROID_DIR}/bionic/libc/kernel/arch-arm -I${ANDROID_DIR}/development/ndk/platforms/android-9/include -I${ANDROID_DIR}/prebuilts/ndk/8/platforms/android-14/arch-arm/usr/include -I${ANDROID_DIR}/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/lib/gcc/arm-linux-androideabi/4.7/include -I${ANDROID_DIR}/external/bison/lib/" LDFLAGS="-Wl,-rpath-link=${ANDROID_DIR}/out/target/product/saturn/system/lib -L${ANDROID_DIR}/out/target/product/saturn/system/lib -L${ANDROID_DIR}/out/target/products/system/lib -L${ANDROID_DIR}/prebuilts/ndk/8/platforms/android-14/arch-arm/usr/lib" --without-bzip2 --without-zlib



. /etc/profile
java -version
export ANDROID_DIR=/opt/cBPM-android/android4.4_source_code
export PATH=$ANDROID_DIR/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:$PATH

export PATH=/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin:$PATH

. build/envsetup.sh
chooseproduct
mmm external/lighttpd-1.4.37

[root@localhost android4.4_source_code]#


[root@localhost lighttpd-1.4.37]# cd /opt/cBPM-android/android4.4_source_code/build/
. envsetup.sh
cd -
[root@localhost lighttpd-1.4.37]# mm showcommands

编译完成后,生成lighttpd, liblighttpd_common.so 和 其他 plugin modules.

-------------------------------------------------------------------
编译过程中的问题如下:
-------------------------------------------------------------------
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'extern
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'


曾经遇到这个问题,虽然这个贴子时间长了点,但估计还会有人遇到同样问题的。如果error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘XXX’,如果XXX是类名,那么几乎可以肯定地说是你的C文件里包含了C++头文件。楼主遇到的正是这个问题。建议不要使用10楼的方法。最好的方法是,不要去包含c++头文件!如果你的C文件要用到类,干脆直接将C文件改成CPP文件得了。缺少标点符号和全半角的提示是不一样的。可以自己试一下就知道了。
-------
 c++ 没有向c做接口extern"C",这是一些程序员的通病~
-------
 我再补充一下,还有一种可能是,新加的内容与原有的头文件有冲突。我就是这个情况。
-------
-------
-------
-------------------------------------------------------------------
[root@localhost android4.4_source_code]# gedit external/lighttpd-1.4.37/../../external/bison/lib/xalloc.h
//ztg add
#define _GL_INLINE_HEADER_BEGIN
#define _Noreturn
#define XALLOC_INLINE
-------------------------------------------------------------------
[root@localhost lighttpd-1.4.37]# find ../../external/bison/lib/ ../../bionic/libc/include/ ../../bionic/libc/include/sys/ ../../bionic/libc/arch-arm/include/ ../../bionic/libc/kernel/common/ ../../bionic/libc/kernel/common/linux/ ../../bionic/libc/kernel/arch-arm ../../development/ndk/platforms/android-9/include ../../prebuilts/ndk/8/platforms/android-14/arch-arm/usr/include ../../prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/lib/gcc/arm-linux-androideabi/4.7/include -name stddef.h

../../bionic/libc/kernel/common/linux/stddef.h
../../bionic/libc/kernel/common/linux/stddef.h
../../prebuilts/ndk/8/platforms/android-14/arch-arm/usr/include/linux/stddef.h
../../prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/lib/gcc/arm-linux-androideabi/4.7/include/stddef.h
[root@localhost lighttpd-1.4.37]#

[root@localhost lighttpd-1.4.37]# gedit ../../prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/lib/gcc/arm-linux-androideabi/4.7/include/stddef.h
修改该文件:
line:216   typedef __SIZE_TYPE__ size_t;    typedef __WCHAR_TYPE__ wchar_t;

-------------------------------------------------------------------将头文件包含路径减少后,下面 不用
[root@localhost lighttpd-1.4.37]# mv ../../bionic/libc/kernel/common/linux/stddef.h ../../bionic/libc/kernel/common/linux/stddef.h.bac

[root@localhost lighttpd-1.4.37]# mv ../../bionic/libc/include/sys/errno.h ../../bionic/libc/include/sys/errno.h.bac

-------------------------------------------------------------------
[root@localhost lighttpd-1.4.37]# find ../../external/bison/lib/ ../../bionic/libc/include/ ../../bionic/libc/include/sys/ ../../bionic/libc/arch-arm/include/ ../../bionic/libc/kernel/common/ ../../bionic/libc/kernel/common/linux/ ../../bionic/libc/kernel/arch-arm ../../development/ndk/platforms/android-9/include ../../prebuilts/ndk/8/platforms/android-14/arch-arm/usr/include ../../prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/lib/gcc/arm-linux-androideabi/4.7/include -name wchar.h
../../bionic/libc/include/wchar.h
../../development/ndk/platforms/android-9/include/wchar.h
../../prebuilts/ndk/8/platforms/android-14/arch-arm/usr/include/wchar.h
[root@localhost lighttpd-1.4.37]#
-------------------------------------------------------------------
头文件问题:
/opt/cBPM-android/android4.4_source_code/external/lighttpd-1.4.37/Android.mk
添加如下内容:
LOCAL_C_INCLUDES := \
    $(LOCAL_PATH)/../../external/bison/lib/ \
    $(LOCAL_PATH)/../../bionic/libc/include/ \
    $(LOCAL_PATH)/../../bionic/libc/include/sys/ \
    $(LOCAL_PATH)/../../bionic/libc/arch-arm/include/ \
    $(LOCAL_PATH)/../../bionic/libc/kernel/common/ \
    $(LOCAL_PATH)/../../bionic/libc/kernel/common/linux/ \
    $(LOCAL_PATH)/../../bionic/libc/kernel/arch-arm \
    $(LOCAL_PATH)/../../development/ndk/platforms/android-9/include \
    $(LOCAL_PATH)/../../prebuilts/ndk/8/platforms/android-14/arch-arm/usr/include \
    $(LOCAL_PATH)/../../prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/lib/gcc/arm-linux-androideabi/4.7/include


------------------------------------------------------------------- 完整编译android 4.4源码—问题—CSSValueKeywords.cpp—CSSPropertyNames.cpp

make: *** [out/target/product/generic/obj/GYP/shared_intermediates/blink/CSSValueKeywords.cpp] 错误 1
make: *** 正在等待未完成的任务....
make: *** [out/target/product/generic/obj/GYP/shared_intermediates/blink/CSSPropertyNames.cpp] 错误 1

-------------解决方法
http://blog.chinaunix.net/uid-14735472-id-5213862.html

[root@localhost android4.4_source_code]# yum install gperf


-------------------------------------------------------------------
[root@localhost lighttpd-1.4.37]# cp ../../external/bison/lib/bitset.c src/

[root@localhost android4.4_source_code]# gedit bionic/libc/include/sys/stddef.h           //新建文件
添加如下内容:
typedef __WCHAR_TYPE__ wchar_t;
typedef __SIZE_TYPE__ size_t;
-------------------------------------------------------------------
ld找不到  crtbegin_so.o 和 crteng_so.o, 解决方法是,在项目源码下面建立软连接

[root@localhost lighttpd-1.4.37]# pwd
/opt/cBPM-android/android4.4_source_code/external/lighttpd-1.4.37
[root@localhost lighttpd-1.4.37]#
ln -s /opt/cBPM-android/android4.4_source_code/prebuilts/ndk/8/platforms/android-14/arch-arm/usr/lib/crtend_so.o ./src/
ln -s /opt/cBPM-android/android4.4_source_code/prebuilts/ndk/8/platforms/android-14/arch-arm/usr/lib/crtbegin_so.o ./src/

-------------------------------------------------------------------缺少pcre,  error: cannot find -lpcre
[root@localhost cBPM-android]# pwd
/opt/cBPM-android
[root@localhost cBPM-android]# wget -c
[root@localhost cBPM-android]# tar xjf pcre-8.37.tar.bz2 -C /opt/cBPM-android/android4.4_source_code/external/
[root@localhost cBPM-android]# gedit /opt/cBPM-android/android4.4_source_code/external/pcre-8.37/Android.mk
内容如下:
-----------------------------
省略
-----------------------------

[root@localhost android4.4_source_code]# mmm external/pcre-8.37
[root@localhost android4.4_source_code]# ls out/target/product/generic/obj/STATIC_LIBRARIES/libpcre_intermediates/libpcre.a out/target/product/generic/obj/STATIC_LIBRARIES/libpcre_intermediates/libpcre.a
[root@localhost android4.4_source_code]#


----------------------------------------->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>编译pcre  开始
export ANDROID_DIR=/opt/cBPM-android/android4.4_source_code
export PATH=$ANDROID_DIR/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:$PATH

[root@localhost pcre-8.37]#
./configure --host=arm-linux CC=arm-linux-androideabi-gcc CPP=arm-linux-androideabi-cpp CFLAGS="-nostdlib -DHAVE_STRERROR=1" CPPFLAGS="-I${ANDROID_DIR}/development/ndk/platforms/android-9/include -I${ANDROID_DIR}/bionic/libc/include/ -I${ANDROID_DIR}/bionic/libc/arch-arm/include/ -I${ANDROID_DIR}/bionic/libc/kernel/common/ -I${ANDROID_DIR}/bionic/libc/kernel/common/linux/ -I${ANDROID_DIR}/bionic/libc/kernel/arch-arm" LDFLAGS="-Wl,-rpath-link=${ANDROID_DIR}/out/target/product/saturn/system/lib -L${ANDROID_DIR}/out/target/product/saturn/system/lib" --enable-utf8 --enable-unicode-properties

-----------------把工程整个new一下——完整编译android 4.4源码
[root@localhost android4.4_source_code]#
. /etc/profile
java -version
. build/envsetup.sh
chooseproduct
m -j5

-----------------编译成功,最后的部分输出结果如下:
Creating filesystem with parameters:
    Size: 576716800
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 7040
    Inode size: 256
    Journal blocks: 2200
    Label:
    Blocks: 140800
    Block groups: 5
    Reserved block group size: 39
Created filesystem with 1263/35200 inodes and 81852/140800 blocks
+ '[' 0 -ne 0 ']'
Install system fs image: out/target/product/generic/system.img
out/target/product/generic/system.img+ maxsize=588791808 blocksize=2112 total=576716800 reserve=5947392
make: 离开目录“/opt/cBPM-android/android4.4_source_code”
[root@localhost android4.4_source_code]# du -hs .
36G    .                                                                //编译完成后,整个大小为 36G
[root@localhost android4.4_source_code]#
-----------------
注意:编译android中,linux内核之上的 程序之前,一定要先完整编译android 4.4源码。
-----------------

[root@localhost android4.4_source_code]# cd frameworks/base/
[root@localhost base]# mmm .
make: *** 没有规则可以创建“out/target/product/generic/dex_bootjars/system/framework/bouncycastle.odex”需要的目标“out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/javalib.jar”。 停止。
----------原因: 应该是你的工程没有new过,单独编译某个模块导致的吧。先把工程整个new一下。
[root@localhost base]# cd -
[root@localhost android4.4_source_code]# m -j5        //Makes from the top of the tree.
                                                //这个过程执行时间很长,大概2-8个小时,看机器配置
                                                //不要轻易在 android源代码 根目录执行:make clean
mmm external/pcre-8.37

----------------------成功编译pcre
target StaticLib: libpcre (out/target/product/generic/obj/STATIC_LIBRARIES/libpcre_intermediates/libpcre.a)
target Executable: pcregrep (out/target/product/generic/obj/EXECUTABLES/pcregrep_intermediates/LINKED/pcregrep)
target Non-prelinked: pcregrep (out/target/product/generic/symbols/system/bin/pcregrep)
target Strip: pcregrep (out/target/product/generic/obj/EXECUTABLES/pcregrep_intermediates/pcregrep)
Install: out/target/product/generic/system/bin/pcregrep
然后只要把libpcre.a库和头文件pcre.h拷贝到你的android应用工程中,然后就可以在ndk中使用这个pcre库了。

[root@localhost android4.4_source_code]# find external/pcre-8.37/ -name pcre.h
external/pcre-8.37/pcre.h
[root@localhost android4.4_source_code]# cp external/pcre-8.37/pcre.h external/lighttpd-1.4.37/src/

// 复制库文件
[root@localhost android4.4_source_code]# cp out/target/product/generic/obj/STATIC_LIBRARIES/libpcre_intermediates/libpcre.a external/lighttpd-1.4.37/lib/

[root@localhost android4.4_source_code]# cp out/target/product/generic/obj/STATIC_LIBRARIES/libpcre_intermediates/libpcre.a /opt/cBPM-android/criteria-lin/lib

[root@localhost lighttpd-1.4.37]# gedit Android.mk            //设置库文件路径
BUILD_OPTION_COMMON_LDFLAGS += -L$(LOCAL_PATH)/lib -lpcre

----------------------------------------->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>编译pcre  结束

----------------------------------------->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>编译bison  结束
[root@localhost bison]# pwd
/opt/cBPM-android/android4.4_source_code/external/bison
[root@localhost bison]# gedit Android.mk

#include $(BUILD_HOST_STATIC_LIBRARY)
include $(BUILD_STATIC_LIBRARY)

----------------------------------------->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>编译bison  结束
阅读(1174) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~