Add macros to header files and extended Makefile