Android.mk的LibXtract [英] Android.mk for LibXtract
问题描述
有人可以帮我写Android.mk为LibXtract或点我在正确的directoin?
Can somebody help me write Android.mk for LibXtract or point me in correct directoin?
下面是源LIB - https://github.com/jamiebullock/LibXtract.git
Here is source for lib - https://github.com/jamiebullock/LibXtract.git
或者mayby有使用Linux的方式生成的共享Android中的对象?
Or mayby there is a way to use linux generated shared objects in Android?
推荐答案
特别是对于大项目的建立,各具特色 Android.mk
文件是相当的努力。更何况,如果你不熟悉的Android NDK构建架构的理解需要深挖的文档和Android NDK make文件。我建议尝试使用现有的通过设置 CC
指向您的NDK工具链,以及 CFLAGS + = $ -sysroot(SYSROOT)make文件
,其中 SYSROOT = $ {NDK_INSTALL_DIR} /平台/ android-<水平> / arch-<拱> /
(取决于针对性的Android API版本和体系结构)。即使不知道你的图书馆,我敢打赌,你应该有这样的成功很好的机会。 Android的NDK文件( $ {} NDK_INSTALL_DIR /doc/STANDALONE-TOOLCHAIN.html
)详细介绍了使用独立的工具链和还指示如何创建一个独立的工具链,不会需要使用 -sysroot
参数来 XXX-GCC
。
Especially for bigger established projects, crafting Android.mk
files is quite an effort. More so, if you are not familiar with Android NDK build architecture whose understanding requires digging deep into the documentation and Android NDK make files. I would suggest trying to use existing make files by setting CC
to point to your NDK tool chain, and CFLAGS += -sysroot $(SYSROOT)
where SYSROOT=${NDK_INSTALL_DIR}/platforms/android-<level>/arch-<arch>/
(depending on targeted Android API version and architecture). Even without knowing about your library, I would bet you should have good chance of success this way. Android NDK documentation (${NDK_INSTALL_DIR}/doc/STANDALONE-TOOLCHAIN.html
) details the use of independent tool chain and also instructs how to create a standalone tool chain that will not require the use of -sysroot
argument to xxx-gcc
.
如果您决定使用 Android.mk
相反,你可能要检查现有项目 - CSipSimple 在我脑海中( PJSIP 从转换标准形式GNU make文件)。
If you decide to use Android.mk
instead, you might check existing projects -CSipSimple comes to my mind (PJSIP converted from standard form GNU make files).
重要的是创建采用Android工具链的共享对象。它可以构建他们的应用程序源树之外,然后只共享对象复制到包源库/&LT;建筑方式&gt; /
目录
Important is to create the shared objects using Android tool chains. It is possible to build them outside of your application source tree, and then just copy the shared objects into the package source libs/<architecture>/
directory.
与构建系统集成取决于不知道(包括如何顺利,你的愿望这整个融合是因为同一个项目工作的其他人如)的细节。如果要创建命令行应用程序,最简单的将是有GNU使文件或shell脚本中的包根目录确保 libXtract.so
和你的应用程序包达-to-日致电libXtract使文件和
Ant来构建和包装Java应用程序。如果您在使用蚂蚁
应该有指定使用方法制作
照顾的libXtract.so
。我不知道如果Eclipse完全依靠蚂蚁
用于构建应用程序知道这是否会为通过单击Eclipse中的鼠标按键实现完整的构建是足够了。
Integration with your build system depends on details that are not known (including how smooth you desire this whole integration to be e.g. because of other people working with the same project). If you are creating an application from command line, the easiest would be to have GNU make file or shell script in the package root directory ensure libXtract.so
and your application package is up-to-date by calling libXtract make file and
ant to build and pack your Java application. If you are using ant
there should be a way to specify using make
to take care of libXtract.so
. I am not sure if eclipse is completely relying on ant
for building an application to know if this would be enough for enabling complete build by clicking mouse buttons from within eclipse, too.
这篇关于Android.mk的LibXtract的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!