[Olsr-dev] building 'framework' for Android

Henning Rogge (spam-protected)
Fri Apr 6 19:52:03 CEST 2012

On Fri, Apr 6, 2012 at 17:57, Hans-Christoph Steiner
<(spam-protected)> wrote:
> I was just looking through the common/, config/, framework, and packetbb/ repos to review it for building on Android.  My guess is that the best solution will be for me to write an ndk-build/Android.mk build system for it, since that is the standard native build technique for Android, and it integrates into the Eclipse Android ADT development environment that Google supports and most Android devs use.

You can build a Android compiler environment with the NDK and then set
the compiler (and the include directory I think) in a cross
compilation template for cmake (see /cross directory for an example).
After this you just create your own build directory, run cmake inside
it and you have your way to build the template.

> It looks like Henning recently moved over to using the compiler-defined macros _WIN32, __GLIBC, and __linux__, which makes life easier for things like this kind of stuff.  My question now is: is there anything there that assumes that __linux__ means __GLIBC__ or vice versa?  That is true on GNU/Linux, but not on Android, and sometimes those things are time consuming to track down, so I thought I'd ask to see if it rings any bells.
I must admit I am not sure... at the moment I have been working on the
linux environment, so if something has to be slightly tweaked for
android I am happy to hear suggestions.

I will most likely try to clean up the interface of the os_xxxx.h
header files to the os-dependent one (this was the first attempt, its
still too complicated), but I would be happy to discuss a good way to
do it.


Steven Hawkings about cosmic inflation: "An increase of billions of
billions of percent in a tiny fraction of a second. Of course, that
was before the present government."

More information about the Olsr-dev mailing list