Major overhaul to makefile. Now allows building in a remote directory.