Fixed makefile bugs for CLI