Optimizations to Makefile, macros to determine DDR/PIN registers from PORT