Change build scripts to use Makefile inserts