Update makefile to use pkg-config and only rebuild modified files