Android NDK incremental build

I'm currently working on a large Android app using a massive amount of C++ code. It compiles and runs, so far so good.

Unfortunately, every time I modify something in the structure of my native source (add/delete/rename/move a file), which happens pretty often, ndk-build rebuilds the whole source, even the untouched files.

Does anyone know how I can set up the Android NDK to build incrementally somehow?

Thanks in advance

Answers


I got fed up with the NDK build system, studied it for a bit, and wrote my own makefiles. This was not hard.

However, it was then pointed out to me that by doing this, I would have to take responsibility for tracking future changes to the platform, for example if it becomes necessary to ship binaries for additional processor types, I'd have to modify my homegrown build solution to do that too.

In other contexts, I've sometimes had projects with two build systems - one for quick experiments, another for deployable builds. The time spent updating both now and then was saved many times in the speed gain for daily work. Provided I had to do a real build at least every week or two, things never got very far out of consistency (and both build scripts were in the revision control system, so there was history to examine). Something like this could be done with a custom makefile for debug builds and still using the NDK build system for deployable packages.

(In one case of doing a lot of experiments at the edge of what the platform permits, I actually had my makefile pushing the updated .so onto the device and gave my application one of the discouraged hard-quit buttons, so I could restart it using an updated native library without even having to rebuild and reinstall the apk)


Need Your Help

CAST and IsNumeric

sql-server sql-server-2005

Why would the following query return "Error converting data type varchar to bigint"? Doesn't IsNumeric make the CAST safe? I've tried every numeric datatype in the cast and get the same "Error

Use arrays to add up values based on the title or the alt attribute

javascript arrays forms math

Calculating form has options and based on what the client enters determines what products load in a sidebar. Products are given a quantity that directly reflects that value of the option.

Teaching Kids to Debug Code?

debugging lua

So there are a lot of posts around here about what are the best ways to teach kids to program. I'm interested in the next step, teaching kids how to debug code that doesn't do what they want, or do...