move common parts of makefile to include, add makefile for both engine and shallow