title: Pass build type ("debug"/"release") to ndk-build
body: <p>Android Studio, a project with an NDK library, using ndkBuild with Android.mk. My build uses a static library dependency, and the static library exists as a debug and as a release flavor, in separate directories. The makefile goes:</p>
  
  <pre><code>#Ref to libfoo
  include $(CLEAR_VARS)
  LOCAL_MODULE := foo
  LOCAL_SRC_FILES := $(FOOPROJECT)\foo\build\intermediates\ndkBuild\debug\obj\local\$(TARGET_ARCH_ABI)\libfoo.a
  include $(PREBUILT_STATIC_LIBRARY)
  </code></pre>
  
  <p><code>LOCAL_SRC_FILES</code> has the <code>debug</code> flavor hard-coded as a part of the path. Not good. I'd like to use either "debug" or "release" there, depending on the current build type.</p>
  
  <p>Is the current build type available in the makefile as a variable? If not, is is possible to pass it to ndk-build via the gradle file?</p>