Makefile fixes and definition macro fix