Cut makefile into global and custom bit