mk: Refactor platform.mk a bit