title: NDK build C++ only application
body: <p>I am trying to build a native daemon on Android. The purpose to to control some specific hardware, and Java applications will be able to communicate to this daemon using sockets.</p>
  
  <p>I have been using cmake meanwhile to compile my libraries, demos and the real daemon (which works fine BTW). I am now trying to do 2 different things:</p>
  
  <ol>
  <li>Build the same apps using <code>ndk-build</code>. </li>
  <li>Port the C++ daemon to an Android service, by making JNI calls very similar to the way the c++ daemon works.</li>
  </ol>
  
  <p>As far as I understand, <code>ndk-build</code> cannot make native applications, but only native libraries, which in turn can be loaded by the Java GUI... am I correct? For step1 I don't really need java (and I have proven it already), but I have yet found a way for  <code>ndk-build</code> to spit an elf application.</p>
  
  <p>For reference - I am using cmake, as described here: <a href="http://opekar.blogspot.com/2011/06/android-cmake-is-much-easier-in-ndk-r5b.html" rel="nofollow">http://opekar.blogspot.com/2011/06/android-cmake-is-much-easier-in-ndk-r5b.html</a></p>
  
  <p>This way I can have builds for "normal" linux, and also android using out of source builds. Quite nice hack if you ask me.</p>