split Makefile in two to facilitate reusing linker and extpe