Update Makefile

with rebuild function