fix compile errors in gcc
update Makefile