makefile add CFLAGS= -g3 -Wall -Werror, and fix some error