Makefile fixes (Windows threaded building, separated log targets)