simplify Makefile logic, make them reusable