simplify top-level makefile using more generic constructs.