Factor out implicit rules and settings to common.mk .
Kill unneeded AOSP_ROOT var.
Migrate to common.mk. Add missing lib dependencies.
Support subdirs.