Index: code/branches/merger/src/network/Makefile
===================================================================
--- code/branches/merger/src/network/Makefile	(revision 278)
+++ code/branches/merger/src/network/Makefile	(revision 285)
@@ -1,40 +1,303 @@
-CC=g++
-MAIN_INC=..
-INC=-I ${MAIN_INC}
-
-all: server client
-
-# Link command:
-server: PacketBuffer.o ConnectionManager.o dummyserver.o PacketDecoder.o PacketGenerator.o
-	${CC} PacketDecoder.o PacketGenerator.o ConnectionManager.o dummyserver.o PacketBuffer.o -o server -lenet -lboost_thread -g
-
-dummyserver.o: dummyserver.cc
-	${CC} -c dummyserver.cc -o dummyserver.o -g ${INC}
-# Compilation commands:
-ConnectionManager.o: ConnectionManager.cc ConnectionManager.h
-	${CC} -c ConnectionManager.cc -o ConnectionManager.o -g ${INC}
-ClientConnection.o: ClientConnection.cc ClientConnection.h
-	${CC} -c ClientConnection.cc -o ClientConnection.o -g ${INC}
-
-PacketBuffer.o: PacketBuffer.cc
-	${CC} -c PacketBuffer.cc -o PacketBuffer.o -g ${INC}
-PacketGenerator.o: PacketGenerator.cc
-	${CC} -c PacketGenerator.cc -o PacketGenerator.o -g ${INC}
-PacketDecoder.o: PacketDecoder.cc
-	${CC} -c PacketDecoder.cc -o PacketDecoder.o -g ${INC}
-Client.o: Client.cc
-	${CC} -c Client.cc -g ${INC}
-Server.o: Server.cc
-	${CC} -c Server.cc -g ${INC}
-Synchronisable.o: Synchronisable.cc
-	${CC} -c Synchronisable.cc -g ${INC}
-GameStateManager.o: GameStateManager.cc
-	${CC} -c GameStateManager.cc -g ${INC}
-
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 2.4
+
+# Default target executed when no arguments are given to make.
+default_target: all
+
+#=============================================================================
+# Special targets provided by cmake.
+
+# Disable implicit rules so canoncical targets will work.
+.SUFFIXES:
+
+.SUFFIXES: .hpux_make_needs_suffix_list
+
+# Produce verbose output by default.
+VERBOSE = 1
+
+# Suppress display of executed commands.
+$(VERBOSE).SILENT:
+
+# A target that is always out of date.
+cmake_force:
+
+#=============================================================================
+# Set environment variables for the build.
+
+# The shell in which to execute make rules.
+SHELL = /bin/sh
+
+# The CMake executable.
+CMAKE_COMMAND = /usr/bin/cmake
+
+# The command to remove a file.
+RM = /usr/bin/cmake -E remove -f
+
+# The program to use to edit the cache.
+CMAKE_EDIT_COMMAND = /usr/bin/ccmake
+
+# The top-level source directory on which CMake was run.
+CMAKE_SOURCE_DIR = /home/nicolasc/development/orxonoxV2/branches/merger
+
+# The top-level build directory on which CMake was run.
+CMAKE_BINARY_DIR = /home/nicolasc/development/orxonoxV2/branches/merger
+
+# Include the progress variables for this target.
+include CMakeFiles/progress.make
+
+#=============================================================================
+# Targets provided globally by CMake.
+
+# Special rule for the target edit_cache
+edit_cache:
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
+	cd /home/nicolasc/development/orxonoxV2/branches/merger/src/network && /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
+
+# Special rule for the target edit_cache
+edit_cache/fast: edit_cache
+
+# Special rule for the target rebuild_cache
+rebuild_cache:
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
+	cd /home/nicolasc/development/orxonoxV2/branches/merger/src/network && /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
+
+# Special rule for the target rebuild_cache
+rebuild_cache/fast: rebuild_cache
+
+# The main all target
+all: cmake_check_build_system
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(CMAKE_COMMAND) -E cmake_progress_start /home/nicolasc/development/orxonoxV2/branches/merger/CMakeFiles $(CMAKE_ALL_PROGRESS)
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f CMakeFiles/Makefile2 src/network/all
+	$(CMAKE_COMMAND) -E cmake_progress_start /home/nicolasc/development/orxonoxV2/branches/merger/CMakeFiles 0
+
+# The main clean target
 clean:
-	rm -rf *.o
-
-client_old: PacketGenerator.o dummyclient.cc
-	${CC} dummyclient.cc PacketGenerator.o -o client -lenet -g ${INC}
-client: PacketGenerator.o ClientConnection.o PacketBuffer.o dummyclient2.cc 
-	${CC} dummyclient2.cc PacketGenerator.o PacketBuffer.o ClientConnection.o -o client -lenet -lboost_thread -g ${INC}
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f CMakeFiles/Makefile2 src/network/clean
+
+# The main clean target
+clean/fast: clean
+
+# Prepare targets for installation.
+preinstall: all
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f CMakeFiles/Makefile2 src/network/preinstall
+
+# Prepare targets for installation.
+preinstall/fast:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f CMakeFiles/Makefile2 src/network/preinstall
+
+# clear depends
+depend:
+	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
+
+# Convenience name for target.
+src/network/CMakeFiles/network.dir/rule:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f CMakeFiles/Makefile2 src/network/CMakeFiles/network.dir/rule
+
+# Convenience name for target.
+network: src/network/CMakeFiles/network.dir/rule
+
+# fast build rule for target.
+network/fast:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/build
+
+# target to build an object file
+Client.o:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/Client.o
+
+# target to preprocess a source file
+Client.i:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/Client.i
+
+# target to generate assembly for a file
+Client.s:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/Client.s
+
+# target to build an object file
+ClientConnection.o:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/ClientConnection.o
+
+# target to preprocess a source file
+ClientConnection.i:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/ClientConnection.i
+
+# target to generate assembly for a file
+ClientConnection.s:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/ClientConnection.s
+
+# target to build an object file
+ConnectionManager.o:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/ConnectionManager.o
+
+# target to preprocess a source file
+ConnectionManager.i:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/ConnectionManager.i
+
+# target to generate assembly for a file
+ConnectionManager.s:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/ConnectionManager.s
+
+# target to build an object file
+GameStateManager.o:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/GameStateManager.o
+
+# target to preprocess a source file
+GameStateManager.i:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/GameStateManager.i
+
+# target to generate assembly for a file
+GameStateManager.s:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/GameStateManager.s
+
+# target to build an object file
+PacketBuffer.o:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/PacketBuffer.o
+
+# target to preprocess a source file
+PacketBuffer.i:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/PacketBuffer.i
+
+# target to generate assembly for a file
+PacketBuffer.s:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/PacketBuffer.s
+
+# target to build an object file
+PacketDecoder.o:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/PacketDecoder.o
+
+# target to preprocess a source file
+PacketDecoder.i:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/PacketDecoder.i
+
+# target to generate assembly for a file
+PacketDecoder.s:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/PacketDecoder.s
+
+# target to build an object file
+PacketGenerator.o:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/PacketGenerator.o
+
+# target to preprocess a source file
+PacketGenerator.i:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/PacketGenerator.i
+
+# target to generate assembly for a file
+PacketGenerator.s:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/PacketGenerator.s
+
+# target to build an object file
+Server.o:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/Server.o
+
+# target to preprocess a source file
+Server.i:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/Server.i
+
+# target to generate assembly for a file
+Server.s:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/Server.s
+
+# target to build an object file
+Synchronisable.o:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/Synchronisable.o
+
+# target to preprocess a source file
+Synchronisable.i:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/Synchronisable.i
+
+# target to generate assembly for a file
+Synchronisable.s:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/Synchronisable.s
+
+# target to build an object file
+dummyclient.o:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/dummyclient.o
+
+# target to preprocess a source file
+dummyclient.i:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/dummyclient.i
+
+# target to generate assembly for a file
+dummyclient.s:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/dummyclient.s
+
+# target to build an object file
+dummyclient2.o:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/dummyclient2.o
+
+# target to preprocess a source file
+dummyclient2.i:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/dummyclient2.i
+
+# target to generate assembly for a file
+dummyclient2.s:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/dummyclient2.s
+
+# target to build an object file
+dummyserver.o:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/dummyserver.o
+
+# target to preprocess a source file
+dummyserver.i:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/dummyserver.i
+
+# target to generate assembly for a file
+dummyserver.s:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(MAKE) -f src/network/CMakeFiles/network.dir/build.make src/network/CMakeFiles/network.dir/dummyserver.s
+
+# Help Target
+help::
+	@echo "The following are some of the valid targets for this Makefile:"
+	@echo "... all (the default if no target is provided)"
+	@echo "... clean"
+	@echo "... depend"
+	@echo "... edit_cache"
+	@echo "... network"
+	@echo "... rebuild_cache"
+	@echo "... Client.o"
+	@echo "... Client.i"
+	@echo "... Client.s"
+	@echo "... ClientConnection.o"
+	@echo "... ClientConnection.i"
+	@echo "... ClientConnection.s"
+	@echo "... ConnectionManager.o"
+	@echo "... ConnectionManager.i"
+	@echo "... ConnectionManager.s"
+	@echo "... GameStateManager.o"
+	@echo "... GameStateManager.i"
+	@echo "... GameStateManager.s"
+	@echo "... PacketBuffer.o"
+	@echo "... PacketBuffer.i"
+	@echo "... PacketBuffer.s"
+	@echo "... PacketDecoder.o"
+	@echo "... PacketDecoder.i"
+	@echo "... PacketDecoder.s"
+	@echo "... PacketGenerator.o"
+	@echo "... PacketGenerator.i"
+	@echo "... PacketGenerator.s"
+	@echo "... Server.o"
+	@echo "... Server.i"
+	@echo "... Server.s"
+	@echo "... Synchronisable.o"
+	@echo "... Synchronisable.i"
+	@echo "... Synchronisable.s"
+	@echo "... dummyclient.o"
+	@echo "... dummyclient.i"
+	@echo "... dummyclient.s"
+	@echo "... dummyclient2.o"
+	@echo "... dummyclient2.i"
+	@echo "... dummyclient2.s"
+	@echo "... dummyserver.o"
+	@echo "... dummyserver.i"
+	@echo "... dummyserver.s"
+
+
+
+#=============================================================================
+# Special targets to cleanup operation of make.
+
+# Special rule to run CMake to check the build system integrity.
+# No rule that depends on this can have commands that come from listfiles
+# because they might be regenerated.
+cmake_check_build_system:
+	cd /home/nicolasc/development/orxonoxV2/branches/merger && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
+
