Add mirage library dep, and fix Makefile gen