fix compiler warnings
add Makefile