Fix a compile warning
Added some extra consts
Makefile changes

Use -Wwrite-strings because it flagged up a bunch of const errors and
use -U instead of having CFLAGS repeated for the debug target.