started to clean up makefile
silenced all warnings by adding correct casts