title: building a prebuilt static library with ndk-build all
body: <p>I have a problem with an ndk-build script that builds a static library.</p>
  
  <p>The problem is that this script gets included by our application's larger build script, which gets called with <code>ndk-build all</code></p>
  
  <p>The build script for the static library looks like this:</p>
  
  <pre><code># LoadBalancing-cpp
  
  LOCAL_PATH := $(call my-dir)
  
  all_static_libraries = common-cpp-static-prebuilt \
                         photon-cpp-static-prebuilt
  
  lib_suffix := ${APP_OPTIM}_android_${APP_ABI}
  
  lib_loadbalancing_cpp_static_name := loadbalancing-cpp-prebuilt-static_${lib_suffix}
  
  include $(CLEAR_VARS)
  LOCAL_MODULE            := loadbalancing-cpp-static-prebuilt
  LOCAL_SRC_FILES         := lib$(lib_loadbalancing_cpp_static_name).a
  LOCAL_STATIC_LIBRARIES  := $(all_static_libraries)
  include $(PREBUILT_STATIC_LIBRARY)
  
  $(call import-module,common-cpp-prebuilt)
  $(call import-module,photon-cpp-prebuilt)
  </code></pre>
  
  <p>The problem is, building a static library requires the LOCAL_SRC_FILES to point to a single value (the path to the library), however when called with <code>ndk-build all</code> in this case, it will contain multiple values (since lib_suffix will point to all available architectures).</p>
  
  <p>Is there a way to build this file using ndk-build all ?</p>