Update Makefile to run cmake when needed