Fixed #defines and makefile problems