Adapted Makefile and fixed gcc compiler warnings.