all: targetfile

targetfile: subproject/targetfile intermediatefile
somecommand1

intermediatefile: sourcefile1 resourcesobj
somecommand2

resourcesobj: sourcefile2 patchedsubprojectfile
somecommand3

patchedsubprojectfile: subproject/targetfile
somecommand4

subproject/targetfile: subprojectphony

subprojectphony:
@$(MAKE) -C subproject

.PHONY: all subprojectphony