The README says clone from android.git.kernel.org, but that doesn’t work, maybe somthing to do with the breach last year. I used this instead https://github.com/android/platform_external_jpeg. Also ndk-build can’t be run from the root directory.
However the build_native.sh give the right instructions. though my ndk-build stopped when it couldn’t find allheaders.h.