Can somebody help me write Android.mk for LibXtract or point me in correct directoin?
Here is source for lib – https://github.com/jamiebullock/LibXtract.git
Or mayby there is a way to use linux generated shared objects in Android?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Especially for bigger established projects, crafting
Android.mkfiles 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 settingCCto point to your NDK tool chain, andCFLAGS += -sysroot $(SYSROOT)whereSYSROOT=${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-sysrootargument toxxx-gcc.If you decide to use
Android.mkinstead, you might check existing projects –CSipSimple comes to my mind (PJSIP converted from standard form GNU make files).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.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.soand your application package is up-to-date by calling libXtract make fileandant to build and pack your Java application. If you are usingantthere should be a way to specify usingmaketo take care oflibXtract.so. I am not sure if eclipse is completely relying onantfor building an application to know if this would be enough for enabling complete build by clicking mouse buttons from within eclipse, too.