add makefile and logapi.c