Makefile: refactor

Split out rules to generate .hex from .elf, .bin from .elf and so on.