add core/version.h rule to Makefile
fix config subcalls
remove unused POTION_DEBUG, fix DEBUG logic