added Makefile for c based test program

also fixed casting warning from gcc under Linux