Fix Makefile

Install dependencies, then build, then test, then install