makefile refactoring for Android