split package.mk and clean up build system code (based on patch by mbm), makes the...