Edit makefile and rdef to correctly build