title: How to incorporate existing make file with Android NDK
body: <p>So I have a huge existing C project that I have placed in <code>$PROJECT/jni</code> directory. This project is normally made by running a configure script which creates the Makefiles which then allows the project to be compiled via <code>make</code>.</p>
  
  <p>This project is rather large and has many directories containing source files and header files.</p>
  
  <p>I guess I am missing a fundamental understanding here of how <code>Android.mk</code> is supposed to work. Is it supposed to replace the configure and makefile that is currently used to compile the project? Or would I be incorporating the generated makefile from my configure script into the <code>Android.mk</code>? The examples they provide are rather trivial with only a few source files. My <code>jni</code> directory looks more like:</p>
  
  <pre><code>jni/
    folder1/subfolder1
    folder1/subfolder2
    folder1/source
    folder2/source
    .....
    foldern/source
    configure/
    configure/configure.sh
    Makefile
    Android.mk
  </code></pre>
  
  <p>The generated makefiles are pretty extensive (good amount of configuration and there is one in every directory) so I am little lost as to how to approach this.</p>
  
  <p>EDIT:</p>
  
  <p>The major issue is that the examples that ship with the NDK are trivial examples. They have 3-5 source files in the top level jni directory. My issue is that this is a huge project with complex configuration with 4 top level folders each with many subdirectories. I cannot simply move the source into the jni folder and run the ndk compiler.</p>