optimize Makefile for server