How to use BUILD_PREBUILD

转载 2012年03月23日 10:52:40

对于Android系统集成有源码的第三方库和程序,只需要提供Android.mk文件,把源码集成到Android编译系统中就可以了,并且有很多例子可以参考。但是对于没有源码的pre-build第三方库和程序,网上介绍的比较少,可以参考的例子也不多。本文简单介绍一下集成pre-build库和程序时候,怎样编写Android.mk。

1、集成静态库

   1: LOCAL_PATH := $(call my-dir)

   2: include $(CLEAR_VARS)

   3:  

   4: LOCAL_PREBUILT_LIBS := libA.a    \

   5:                        libB.a

   6:                         

   7: LOCAL_STATIC_LIBRARIES := libA    \

   8:                         libB

   9:  

  10: include $(BUILD_MULTI_PREBUILT)

2、集成动态库

   1: LOCAL_PATH := $(call my-dir)

   2: include $(CLEAR_VARS)

   3:  

   4: LOCAL_PREBUILT_LIBS := libA.so

   5:                         libB.so

   6: include $(BUILD_MULTI_PREBUILT)

3、集成可执行程序

   1: LOCAL_PATH := $(call my-dir)

   2: include $(CLEAR_VARS)

   3:  

   4: LOCAL_SRC_FILES := hellovprc.elf 

   5: LOCAL_MODULE := hellovprc.elf

   6: LOCAL_MODULE_CLASS := EXECUTABLES

   7: LOCAL_MODULE_TAGS := debug

   8: include $(BUILD_PREBUILT)

4、集成pre-build Android应用程序(APK)

    参考Adding a prebuilt APK

5.

更容易的方式是:

$(call add-prebuilt-files, ETC, pv_player.cfg)

它会将pv_player.cfg copy to system/etc下,还可以设定类型:

ETC,APPS,EXECUTABLES,SHARED_LIBRARIES,STATIC_LIBRARIES

 

add-prebuilt-files的定义是在build/core/definitions.mk下

相关文章推荐

[Backup] How to build and use Pansenti / meta-pansenti for Gumstix Overo Ironstorm

The original post Building small board systems with the Yocto Project is not available, here is the ...
  • Pyen
  • Pyen
  • 2013-11-12 02:22
  • 1954

How to build & install GLFW 3 and use it in a Linux project

GLFW3 This may not be the correct place for this “question”, indeed it is actually an answer, or I...

how-to-install-ganglia-from-prebuild-rpm-on-centos6.6-x86_64

how-to-install-ganglia-from-prebuild-rpm-on-centos6.6-x86_64 写作缘由:之前对 ganglia 监控做过一些测试,部署使用简单;简单整理一下...

how to use htmleditor

  • 2015-07-19 18:17
  • 4.43MB
  • 下载

How+to+use+Simulink

  • 2012-11-26 17:07
  • 1020KB
  • 下载

how to tell if you can use kvm

kvm Check out https://help.ubuntu.com/community/KVM for more updated and complete information...

How to use microsoft access

  • 2014-05-23 08:38
  • 896KB
  • 下载

How can I use Microsoft Visual C++ 2010 to create MEX files with MATLAB 7.10 (R2010a)?

直接下载下面的压缩包,然后解压出来,把\bin\win32\mexopts里面对应的文件拷贝到matlab2010a安装路径里面对应的文件夹下面即可!!   I have Visual Studi...

How_to_use_HyperTerminal.doc

  • 2015-11-05 09:23
  • 90KB
  • 下载
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)