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 "$@" 5if [ "$?" != 0 ]; then 6 echo "ERROR: Could not build project!" 7 exit 1 8fi 9 10# Check that libfoo.a was built properly. 11LIBFOO_LIBS=$(find . -name "libfoo.a" 2>/dev/null) 12if [ -z "$LIBFOO_LIBS" ]; then 13 echo "ERROR: Could not find libfoo.a anywhere:" 14 tree . 15 exit 1 16fi 17 18# Check that libcpufeatures.a was _not_ built because it was not 19# a top-level module, but an imported one. 20CPUFEATURES_LIBS=$(find . -name "libcpufeatures.a" 2>/dev/null) 21if [ -n "$CPUFEATURES_LIBS" ]; then 22 echo "ERROR: Should not find libcpufeatures.a in output directory:" 23 tree . 24 exit 1 25fi 26 27