Makefile

Make build more customizable and clever, this is required to build the project on e.g. FreeBSD