generalize the Makefile to fallback to env vars