1 # Check that if there are no installable modules (i.e. shared libraries 2 # or executables), ndk-build will automatically build static library 3 # modules. 4 $NDK/ndk-build "$@" 5 if [ "$?" != 0 ]; then 6 echo "ERROR: Could not build project!" 7 exit 1 8 fi 9 10 # Check that libfoo.a was built properly. 11 LIBFOO_LIBS=$(find . -name "libfoo.a" 2>/dev/null) 12 if [ -z "$LIBFOO_LIBS" ]; then 13 echo "ERROR: Could not find libfoo.a anywhere:" 14 tree . 15 exit 1 16 fi 17 18 # Check that libcpufeatures.a was _not_ built because it was not 19 # a top-level module, but an imported one. 20 CPUFEATURES_LIBS=$(find . -name "libcpufeatures.a" 2>/dev/null) 21 if [ -n "$CPUFEATURES_LIBS" ]; then 22 echo "ERROR: Should not find libcpufeatures.a in output directory:" 23 tree . 24 exit 1 25 fi 26 27