Add makefile for gcc and fix a compile error.