Modify makefile to build in CM