Tool to create Android.mk

I have a large C ++ project that contains about a hundred source files that are located in a bunch of subfolders. They were originally developed using the Xcode IDE, so there were no make files there.

Now I need to create it for Android using the NDK. I understand how to create Android.mk, but I'm wondering if there is any visual tool or maybe a script that can do this (or at least a basic structure) automatically (maybe smth. Like cmake) or do I need to do everything manually (I "I will spend a lot of time on this ...)?

+4
source share
2 answers

Well, you really can use cmake. I do this in several projects using the android ndk toolchain and a modified script that I took from this project that comes from the start port in the android OpenCV library.

If you do not want to use these scripts as CMAKE_TOOLCHAIN_FILE (I did not want to either), you can do something like:

# Setting android build SET(CMAKE_TOOLCHAIN_FILE ${CMAKE_MODULE}/android.toolchain.cmake) # Project name PROJECT (YOUR_PROJECT CXX C) .. configure your project here 
+4
source

I created a simple script to generate Android.mk , you can see additional information from here .

You can use the -s|--scan option to add all your sources to your subfolders to your LOCAL_SRC_FILES in Android.mk .

0
source

All Articles