improved makefile to make compilation and installing work on more systems