fixed error in define, reorganized makefile a little