Made makefile and build process more generic