Restructure makefile and add install target