Makefile for compile examples
fixed warning/error in file api