build: make PREFIX overwritable from the environment
build: put comment about local.mk to the place where it is included
build: drop BASIC_CFLAGS and ALL_CFLAGS
build: drop -g from LDFLAGS
build: pass CPPFLAGS to compiler
build: only generate version.h when needed