Index: code/branches/buildsystem3/src/network/CMakeLists.txt
===================================================================
--- code/branches/buildsystem3/src/network/CMakeLists.txt	(revision 2663)
+++ code/branches/buildsystem3/src/network/CMakeLists.txt	(revision 2664)
@@ -1,3 +1,22 @@
-SET( NETWORK_SRC_FILES
+ #
+ #             ORXONOX - the hottest 3D action shooter ever to exist
+ #                             > www.orxonox.net <
+ #
+ #        This program is free software; you can redistribute it and/or
+ #         modify it under the terms of the GNU General Public License
+ #        as published by the Free Software Foundation; either version 2
+ #            of the License, or (at your option) any later version.
+ #
+ #       This program is distributed in the hope that it will be useful,
+ #        but WITHOUT ANY WARRANTY; without even the implied warranty of
+ #        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ #                 GNU General Public License for more details.
+ #
+ #   You should have received a copy of the GNU General Public License along
+ #      with this program; if not, write to the Free Software Foundation,
+ #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ #
+
+SET_SOURCE_FILES(NETWORK_SRC_FILES
   ChatListener.cc
   Client.cc
@@ -14,36 +33,35 @@
   Host.cc
 )
+ADD_SUBDIRECTORY(packet)
+GET_ALL_HEADER_FILES(NETWORK_HDR_FILES)
+SET(NETWORK_FILES ${NETWORK_SRC_FILES} ${NETWORK_HDR_FILES})
 
-ADD_SOURCE_DIRECTORY(NETWORK_SRC_FILES packet)
+GENERATE_SOURCE_GROUPS(${NETWORK_FILES})
 ADD_SOURCE_DIRECTORY(NETWORK_SRC_FILES synchronisable)
 
-
-IF(WIN32)
-  ADD_LIBRARY( network ${NETWORK_SRC_FILES} )
-ELSE(WIN32)
-  ADD_LIBRARY( network SHARED ${NETWORK_SRC_FILES} )
-ENDIF(WIN32)
-
-TARGET_LINK_LIBRARIES( network
+ADD_LIBRARY(network SHARED ${NETWORK_FILES})
+SET_TARGET_PROPERTIES(network PROPERTIES DEFINE_SYMBOL "NETWORK_SHARED_BUILD")
+TARGET_LINK_LIBRARIES(network
   ${ZLIB_LIBRARY}
-  ${ENet_LIBRARY}
-  ${Boost_thread_LIBRARIES}
+  ${ENET_LIBRARY}
+  ${Boost_THREAD_LIBRARY}
+  util
   core
 )
 
+ORXONOX_INSTALL(network)
 
 # build those parts only on request.
 IF(NETWORK_TESTING_ENABLED)
   ##### test for gamestate stuff #####
-  SET( TEST_SRC_FILES
+  SET(TEST_SRC_FILES
     ${NETWORK_SRC_FILES}
   )
   ADD_EXECUTABLE(networktest ${TEST_SRC_FILES})
-  TARGET_LINK_LIBRARIES( networktest
-    ${OGRE_LIBRARIES}
+  TARGET_LINK_LIBRARIES(networktest
+    ${OGRE_LIBRARY}
     network
-    ${ENet_LIBRARY}
+    ${ENET_LIBRARY}
     ${ZLIB_LIBRARY}
-    ${WINDOWS_ENET_DEPENDENCIES}
   )
   ##### end test for gamestate stuff #####
Index: code/branches/buildsystem3/src/network/Makefile.norm
===================================================================
--- code/branches/buildsystem3/src/network/Makefile.norm	(revision 2663)
+++ 	(revision )
@@ -1,40 +1,0 @@
-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}
-
-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}
Index: code/branches/buildsystem3/src/network/Makefile.tardis
===================================================================
--- code/branches/buildsystem3/src/network/Makefile.tardis	(revision 2663)
+++ 	(revision )
@@ -1,39 +1,0 @@
-all: server client
-
-CC=g++-4.1.1
-
-BOOST_INC=/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/include/boost-1_34_1/
-BOOST_LIB=/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/lib/
-MAIN_INC=..
-ENET_INC=/usr/pack/enet-2007-sd/include/
-ENET_LIB=/usr/pack/enet-2007-sd/i686-debian-linux3.1/lib/
-INC=-I ${BOOST_INC} -I ${MAIN_INC} -I ${ENET_INC}
-LIB=-L ${BOOST_LIB} -L ${ENET_LIB}
-
-# Link command:
-server: clean PacketBuffer.o ConnectionManager.o dummyserver.o PacketGenerator.o PacketDecoder.o
-	${CC} ConnectionManager.o dummyserver.o PacketBuffer.o PacketDecoder.o PacketGenerator.o -o server -lenet -lboost_thread-gcc41-mt -g ${INC} ${LIB} -Wl,-rpath,${BOOST_LIB} -Wl,-rpath,${ENET_LIB}
-
-dummyserver.o:
-	${CC} -c dummyserver.cc -o dummyserver.o -g ${INC}
-# Compilation commands:
-
-ConnectionManager.o:
-	${CC} -c ConnectionManager.cc -o ConnectionManager.o -g ${INC}
-
-PacketBuffer.o: 
-	${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}
-Synchronisable.o: Synchronisable.cc
-	${CC} -c Synchronisable.cc -g ${INC}
-GameStateManager.o: GameStateManager.cc
-	${CC} -c GameStateManager.cc -g ${INC}
-
-clean:
-	rm -rf *.o
-
-client: dummyclient.cc PacketDecoder.o PacketGenerator.o
-	${CC} PacketGenerator.o PacketDecoder.o dummyclient.cc -o client -lenet ${LIB} ${INC} -Wl,-rpath,${BOOST_LIB}
Index: code/branches/buildsystem3/src/network/Makefile.test
===================================================================
--- code/branches/buildsystem3/src/network/Makefile.test	(revision 2663)
+++ 	(revision )
@@ -1,45 +1,0 @@
-CC=g++
-MAIN_INC=..
-INC=-I ${MAIN_INC} -I..
-
-all: server client
-
-# Link command:
-server: PacketBuffer.o ConnectionManager.o dummyserver.o PacketDecoder.o PacketGenerator.o ClientInformation.o
-	${CC} PacketDecoder.o PacketGenerator.o ClientInformation.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}
-ClientInformation.o: ClientInformation.cc
-	${CC} -c ClientInformation.cc -g ${INC}
-
-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}
-
-chatserver: Server.o ConnectionManager.o PacketGenerator.o PacketDecoder.o PacketBuffer.o ClientInformation.o GameStateManager.o
-	${CC} dummyserver3.cc Server.o ConnectionManager.o PacketGenerator.o PacketBuffer.o GameStateManager.o ClientInformation.o -o chatserver -lenet -lboost_thread -g ${INC}
Index: code/branches/buildsystem3/src/network/NetworkPrereqs.h
===================================================================
--- code/branches/buildsystem3/src/network/NetworkPrereqs.h	(revision 2663)
+++ code/branches/buildsystem3/src/network/NetworkPrereqs.h	(revision 2664)
@@ -35,10 +35,10 @@
 #define _NetworkPrereqs_H__
 
-#include "util/OrxonoxPlatform.h"
+#include "OrxonoxConfig.h"
 
 //-----------------------------------------------------------------------
 // Shared library settings
 //-----------------------------------------------------------------------
-#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( NETWORK_STATIC_BUILD )
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined( NETWORK_STATIC_BUILD )
 #  ifdef NETWORK_SHARED_BUILD
 #    define _NetworkExport __declspec(dllexport)
Index: code/branches/buildsystem3/src/network/packet/CMakeLists.txt
===================================================================
--- code/branches/buildsystem3/src/network/packet/CMakeLists.txt	(revision 2663)
+++ code/branches/buildsystem3/src/network/packet/CMakeLists.txt	(revision 2664)
@@ -1,3 +1,3 @@
-SET( SRC_FILES
+ADD_SOURCE_FILES(NETWORK_SRC_FILES
   Packet.cc
   Chat.cc
@@ -8,4 +8,2 @@
   DeleteObjects.cc
 )
-
-ADD_SOURCE_FILES(SRC_FILES)
Index: code/branches/buildsystem3/src/network/packet/Packet.cc
===================================================================
--- code/branches/buildsystem3/src/network/packet/Packet.cc	(revision 2663)
+++ code/branches/buildsystem3/src/network/packet/Packet.cc	(revision 2664)
@@ -167,5 +167,5 @@
   assert(ClientInformation::findClient(&peer->address)->getID() != (unsigned int)-2 || !Host::isServer());
   unsigned int clientID = ClientInformation::findClient(&peer->address)->getID();
-  Packet *p;
+  Packet *p = 0;
   COUT(5) << "packet type: " << *(ENUM::Type *)&data[_PACKETID] << std::endl;
   switch( *(ENUM::Type *)(data + _PACKETID) )
Index: code/branches/buildsystem3/src/network/packet/Packet.h
===================================================================
--- code/branches/buildsystem3/src/network/packet/Packet.h	(revision 2663)
+++ code/branches/buildsystem3/src/network/packet/Packet.h	(revision 2664)
@@ -34,6 +34,4 @@
 #include <enet/enet.h>
 #include <boost/thread/recursive_mutex.hpp>
-
-#include "util/Integers.h"
 
 namespace orxonox {
