Refactor rules in android-mk.sh