Index: server/makefile
===================================================================
--- server/makefile	(revision e08495082ae80810734be6bd71168a2d7ff2a384)
+++ server/makefile	(revision 07028b9d09016d32dfb6b79ea2273a2fc8e610f5)
@@ -1,2 +1,18 @@
-server : ../common/message.cpp server.cpp
-	g++ -o $@ $? -lssl -lmysqlclient
+CC = g++
+LIB_FLAGS = -lssl -lmysqlclient
+FLAGS = $(LIB_FLAGS)
+COMMON_PATH = ../common
+DEPENDENCIES = message.o player.o
+
+server : server.cpp $(DEPENDENCIES)
+	$(CC) -o $@ $+ $(FLAGS)
+
+message.o : $(COMMON_PATH)/message.cpp
+	$(CC) -c -o $@ $?
+
+%.o : %.cpp
+	$(CC) -c -o $@ $?
+
+clean:
+	rm *.o
+	rm server
