fix condition in server/main.cpp
add global Makefile