Index: src/providers/Makefile
===================================================================
--- src/providers/Makefile	(révision 4)
+++ src/providers/Makefile	(révision 205)
@@ -1,84 +0,0 @@
-# CMAKE generated file: DO NOT EDIT!
-# Generated by "Unix Makefiles" Generator, CMake Version 2.2
-
-#=============================================================================
-# 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/noularde/TSP/tsp_all/tsp
-
-# The top-level build directory on which CMake was run.
-CMAKE_BINARY_DIR = /home/noularde/TSP/tsp_all/tsp
-
-#=============================================================================
-# Special targets provided by cmake.
-
-# Default target executed when no arguments are given to make.
-default_target: all
-
-# Special rule to run installation script.
-install: all
-	$(CMAKE_COMMAND) -P cmake_install.cmake
-
-# Special rule to re-run CMake using make.
-rebuild_cache:
-	@echo "Running CMake to regenerate build system..."
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Special rule to re-run CMake cache editor using make.
-edit_cache:
-	@echo "Running CMake cache editor..."
-	$(CMAKE_EDIT_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Suppress display of executed commands.
-$(VERBOSE).SILENT:
-
-# Disable implicit rules so canoncical targets will work.
-.SUFFIXES:
-
-.SUFFIXES: .hpux_make_needs_suffix_list
-
-# The main all target
-all:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/providers/directorystart
-
-# The main clean target
-clean:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/providers/clean
-
-# clear depends
-depend:
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
-
-# 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 "... install"
-	@echo "... rebuild_cache"
-
-
-
-#=============================================================================
-# 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:
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
-
Index: src/providers/rt_stub/Makefile
===================================================================
--- src/providers/rt_stub/Makefile	(révision 4)
+++ src/providers/rt_stub/Makefile	(révision 205)
@@ -1,84 +0,0 @@
-# CMAKE generated file: DO NOT EDIT!
-# Generated by "Unix Makefiles" Generator, CMake Version 2.2
-
-#=============================================================================
-# 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/noularde/TSP/tsp_all/tsp
-
-# The top-level build directory on which CMake was run.
-CMAKE_BINARY_DIR = /home/noularde/TSP/tsp_all/tsp
-
-#=============================================================================
-# Special targets provided by cmake.
-
-# Default target executed when no arguments are given to make.
-default_target: all
-
-# Special rule to run installation script.
-install: all
-	$(CMAKE_COMMAND) -P cmake_install.cmake
-
-# Special rule to re-run CMake using make.
-rebuild_cache:
-	@echo "Running CMake to regenerate build system..."
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Special rule to re-run CMake cache editor using make.
-edit_cache:
-	@echo "Running CMake cache editor..."
-	$(CMAKE_EDIT_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Suppress display of executed commands.
-$(VERBOSE).SILENT:
-
-# Disable implicit rules so canoncical targets will work.
-.SUFFIXES:
-
-.SUFFIXES: .hpux_make_needs_suffix_list
-
-# The main all target
-all:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/providers/rt_stub/directorystart
-
-# The main clean target
-clean:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/providers/rt_stub/clean
-
-# clear depends
-depend:
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
-
-# 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 "... install"
-	@echo "... rebuild_cache"
-
-
-
-#=============================================================================
-# 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:
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
-
Index: src/providers/rt_stub/CMakeLists.txt
===================================================================
--- src/providers/rt_stub/CMakeLists.txt	(révision 0)
+++ src/providers/rt_stub/CMakeLists.txt	(révision 205)
@@ -0,0 +1,26 @@
+
+ADD_EXECUTABLE(tsp_rt_stub rtc_util.c stub_loopOnRtc.c main_stub.c)
+TSP_PROGRAM_INSTALL(tsp_rt_stub)
+ADD_DEPENDENCIES(tsp_rt_stub tsp_calc tsp_common tsp_services tsp_provider)
+
+ADD_EXECUTABLE(bb_rt_stub rtc_util.c bb_vars.c main_stub.c)
+TSP_PROGRAM_INSTALL(bb_rt_stub)
+ADD_DEPENDENCIES(bb_rt_stub tsp_calc tsp_common tsp_services tsp_provider)
+
+
+SET(LIBS tsp_calc tsp_histo bb tsp_provider tsp_common tsp_services)
+IF (BUILD_XMLRPC)
+    ADD_DEFINITIONS(${LIBWWW_CFLAGS})
+    SET(LIBS ${LIBS} ${XMLRPCC_ABYSS_SERVER_LIBRARIES} ${LIBWWW_LIBRARIES})
+ENDIF (BUILD_XMLRPC)
+
+# AP : Migration sous Windows
+IF (NOT WIN32)
+	SET(LIBS ${LIBS} m)
+ENDIF (NOT WIN32)
+
+SET(LIBS ${LIBS} ${PTHREAD_LIBRARY_NAME} ${TSP_WIN32_LIB})
+	
+TARGET_LINK_LIBRARIES(tsp_rt_stub ${LIBS})
+TARGET_LINK_LIBRARIES(bb_rt_stub ${LIBS})
+
Index: src/providers/res_reader/Makefile
===================================================================
--- src/providers/res_reader/Makefile	(révision 4)
+++ src/providers/res_reader/Makefile	(révision 205)
@@ -1,84 +0,0 @@
-# CMAKE generated file: DO NOT EDIT!
-# Generated by "Unix Makefiles" Generator, CMake Version 2.2
-
-#=============================================================================
-# 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/noularde/TSP/tsp_all/tsp
-
-# The top-level build directory on which CMake was run.
-CMAKE_BINARY_DIR = /home/noularde/TSP/tsp_all/tsp
-
-#=============================================================================
-# Special targets provided by cmake.
-
-# Default target executed when no arguments are given to make.
-default_target: all
-
-# Special rule to run installation script.
-install: all
-	$(CMAKE_COMMAND) -P cmake_install.cmake
-
-# Special rule to re-run CMake using make.
-rebuild_cache:
-	@echo "Running CMake to regenerate build system..."
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Special rule to re-run CMake cache editor using make.
-edit_cache:
-	@echo "Running CMake cache editor..."
-	$(CMAKE_EDIT_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Suppress display of executed commands.
-$(VERBOSE).SILENT:
-
-# Disable implicit rules so canoncical targets will work.
-.SUFFIXES:
-
-.SUFFIXES: .hpux_make_needs_suffix_list
-
-# The main all target
-all:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/providers/res_reader/directorystart
-
-# The main clean target
-clean:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/providers/res_reader/clean
-
-# clear depends
-depend:
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
-
-# 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 "... install"
-	@echo "... rebuild_cache"
-
-
-
-#=============================================================================
-# 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:
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
-
Index: src/providers/res_reader/CMakeLists.txt
===================================================================
--- src/providers/res_reader/CMakeLists.txt	(révision 0)
+++ src/providers/res_reader/CMakeLists.txt	(révision 205)
@@ -0,0 +1,19 @@
+
+
+ADD_EXECUTABLE(tsp_res_reader glue_res.c server_main.c)
+TSP_PROGRAM_INSTALL(tsp_res_reader)
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src/util/libres)
+
+SET(LIBS tsp_res tsp_provider tsp_common tsp_services)
+ADD_DEPENDENCIES(tsp_res_reader ${LIBS})
+
+IF (BUILD_XMLRPC)
+    ADD_DEFINITIONS(${LIBWWW_CFLAGS})
+    SET(LIBS ${LIBS} ${XMLRPCC_ABYSS_SERVER_LIBRARIES} ${LIBWWW_LIBRARIES})
+ENDIF (BUILD_XMLRPC)
+
+SET(LIBS ${LIBS} ${PTHREAD_LIBRARY_NAME} ${TSP_WIN32_LIB})
+	
+TARGET_LINK_LIBRARIES(tsp_res_reader ${LIBS})
+TSP_PROGRAM_INSTALL(tsp_res_reader)
Index: src/providers/vxstub/Makefile
===================================================================
--- src/providers/vxstub/Makefile	(révision 4)
+++ src/providers/vxstub/Makefile	(révision 205)
@@ -1,84 +0,0 @@
-# CMAKE generated file: DO NOT EDIT!
-# Generated by "Unix Makefiles" Generator, CMake Version 2.2
-
-#=============================================================================
-# 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/noularde/TSP/tsp_all/tsp
-
-# The top-level build directory on which CMake was run.
-CMAKE_BINARY_DIR = /home/noularde/TSP/tsp_all/tsp
-
-#=============================================================================
-# Special targets provided by cmake.
-
-# Default target executed when no arguments are given to make.
-default_target: all
-
-# Special rule to run installation script.
-install: all
-	$(CMAKE_COMMAND) -P cmake_install.cmake
-
-# Special rule to re-run CMake using make.
-rebuild_cache:
-	@echo "Running CMake to regenerate build system..."
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Special rule to re-run CMake cache editor using make.
-edit_cache:
-	@echo "Running CMake cache editor..."
-	$(CMAKE_EDIT_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Suppress display of executed commands.
-$(VERBOSE).SILENT:
-
-# Disable implicit rules so canoncical targets will work.
-.SUFFIXES:
-
-.SUFFIXES: .hpux_make_needs_suffix_list
-
-# The main all target
-all:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/providers/vxstub/directorystart
-
-# The main clean target
-clean:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/providers/vxstub/clean
-
-# clear depends
-depend:
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
-
-# 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 "... install"
-	@echo "... rebuild_cache"
-
-
-
-#=============================================================================
-# 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:
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
-
Index: src/providers/CMakeLists.txt
===================================================================
--- src/providers/CMakeLists.txt	(révision 4)
+++ src/providers/CMakeLists.txt	(révision 205)
@@ -1,9 +1,17 @@
 
-ADD_SUBDIRECTORY(bb_provider)
-ADD_SUBDIRECTORY(generic_reader)
-ADD_SUBDIRECTORY(res_reader)
-ADD_SUBDIRECTORY(rt_stub)
+IF (NOT WIN32)
+  ADD_SUBDIRECTORY(bb_provider)
+  ADD_SUBDIRECTORY(generic_reader)
+  ADD_SUBDIRECTORY(res_reader)
+  IF (DUF_FIXME)
+    ADD_SUBDIRECTORY(rt_stub)
+  ENDIF (DUF_FIXME)
+ENDIF (NOT WIN32)
+
 ADD_SUBDIRECTORY(stub)
-ADD_SUBDIRECTORY(vxstub)
+
+IF (NOT WIN32)
+  ADD_SUBDIRECTORY(vxstub)
+ENDIF (NOT WIN32)
 
 
Index: src/providers/bb_provider/Makefile
===================================================================
--- src/providers/bb_provider/Makefile	(révision 4)
+++ src/providers/bb_provider/Makefile	(révision 205)
@@ -1,108 +0,0 @@
-# CMAKE generated file: DO NOT EDIT!
-# Generated by "Unix Makefiles" Generator, CMake Version 2.2
-
-#=============================================================================
-# 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/noularde/TSP/tsp_all/tsp
-
-# The top-level build directory on which CMake was run.
-CMAKE_BINARY_DIR = /home/noularde/TSP/tsp_all/tsp
-
-#=============================================================================
-# Special targets provided by cmake.
-
-# Default target executed when no arguments are given to make.
-default_target: all
-
-# Special rule to run installation script.
-install: all
-	$(CMAKE_COMMAND) -P cmake_install.cmake
-
-# Special rule to re-run CMake using make.
-rebuild_cache:
-	@echo "Running CMake to regenerate build system..."
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Special rule to re-run CMake cache editor using make.
-edit_cache:
-	@echo "Running CMake cache editor..."
-	$(CMAKE_EDIT_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Suppress display of executed commands.
-$(VERBOSE).SILENT:
-
-# Disable implicit rules so canoncical targets will work.
-.SUFFIXES:
-
-.SUFFIXES: .hpux_make_needs_suffix_list
-
-# The main all target
-all:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/providers/bb_provider/directorystart
-
-# The main clean target
-clean:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/providers/bb_provider/clean
-
-# 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/providers/bb_provider/CMakeFiles/bb_tsp_provider.dir/rule:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/providers/bb_provider/CMakeFiles/bb_tsp_provider.dir/rule
-
-# Convenience name for target.
-bb_tsp_provider: src/providers/bb_provider/CMakeFiles/bb_tsp_provider.dir/rule
-
-# Convenience name for target.
-src/providers/bb_provider/CMakeFiles/tsp_bb_provider.dir/rule:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/providers/bb_provider/CMakeFiles/tsp_bb_provider.dir/rule
-
-# Convenience name for target.
-tsp_bb_provider: src/providers/bb_provider/CMakeFiles/tsp_bb_provider.dir/rule
-
-# target for object file
-bb_tsp_provider.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/providers/bb_provider/CMakeFiles/bb_tsp_provider.dir/build.make src/providers/bb_provider/CMakeFiles/bb_tsp_provider.dir/bb_tsp_provider.o
-
-# target for object file
-bb_tsp_provider_main.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/providers/bb_provider/CMakeFiles/tsp_bb_provider.dir/build.make src/providers/bb_provider/CMakeFiles/tsp_bb_provider.dir/bb_tsp_provider_main.o
-
-# 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 "... install"
-	@echo "... rebuild_cache"
-	@echo "... bb_tsp_provider"
-	@echo "... tsp_bb_provider"
-
-
-
-#=============================================================================
-# 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:
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
-
Index: src/providers/bb_provider/bb_tsp_provider_main.c
===================================================================
--- src/providers/bb_provider/bb_tsp_provider_main.c	(révision 4)
+++ src/providers/bb_provider/bb_tsp_provider_main.c	(révision 205)
@@ -80,7 +80,9 @@
 			     TSP_ASYNC_REQUEST_SIMPLE | TSP_ASYNC_REQUEST_NON_BLOCKING,
 			     argv[1],atof(argv[2]), 0);
   TSP_provider_urls(TSP_PUBLISH_URLS_PRINT);
+
   sigwait(&allsigs, &whatsig);
+
   bb_tsp_provider_finalize();
   
   return 0;
Index: src/providers/bb_provider/CMakeLists.txt
===================================================================
--- src/providers/bb_provider/CMakeLists.txt	(révision 4)
+++ src/providers/bb_provider/CMakeLists.txt	(révision 205)
@@ -10,7 +10,11 @@
 ENDIF(TSPTARGET STREQUAL "vxworks")
 
 ADD_EXECUTABLE(${_EXE} ${EXE_SRC})
+TSP_PROGRAM_INSTALL(${_EXE})
+
 ADD_LIBRARY(${_LIB} ${LIB_SRC})
+TSP_LIBRARY_INSTALL(${_LIB})
+
 ADD_DEPENDENCIES(${_LIB} bb)
 ADD_DEPENDENCIES(${_EXE} tsp_provider)
 IF (BUILD_XMLRPC)
@@ -18,9 +22,9 @@
     TARGET_LINK_LIBRARIES(${_EXE}  ${XMLRPCC_ABYSS_SERVER_LIBRARIES} ${LIBWWW_LIBRARIES} )
 ENDIF (BUILD_XMLRPC)    
 
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/util/libbb
-${CMAKE_SOURCE_DIR}/src/providers/bb_provider)
+INCLUDE_DIRECTORIES(
+  ${CMAKE_SOURCE_DIR}/src/util/libbb
+  ${CMAKE_SOURCE_DIR}/src/providers/bb_provider)
 IF(TSPTARGET STREQUAL "vxworks")
 	#TODO: Find a way to generate the .o
 ELSE(TSPTARGET STREQUAL "vxworks")
Index: src/providers/stub/Makefile
===================================================================
--- src/providers/stub/Makefile	(révision 4)
+++ src/providers/stub/Makefile	(révision 205)
@@ -1,100 +0,0 @@
-# CMAKE generated file: DO NOT EDIT!
-# Generated by "Unix Makefiles" Generator, CMake Version 2.2
-
-#=============================================================================
-# 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/noularde/TSP/tsp_all/tsp
-
-# The top-level build directory on which CMake was run.
-CMAKE_BINARY_DIR = /home/noularde/TSP/tsp_all/tsp
-
-#=============================================================================
-# Special targets provided by cmake.
-
-# Default target executed when no arguments are given to make.
-default_target: all
-
-# Special rule to run installation script.
-install: all
-	$(CMAKE_COMMAND) -P cmake_install.cmake
-
-# Special rule to re-run CMake using make.
-rebuild_cache:
-	@echo "Running CMake to regenerate build system..."
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Special rule to re-run CMake cache editor using make.
-edit_cache:
-	@echo "Running CMake cache editor..."
-	$(CMAKE_EDIT_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Suppress display of executed commands.
-$(VERBOSE).SILENT:
-
-# Disable implicit rules so canoncical targets will work.
-.SUFFIXES:
-
-.SUFFIXES: .hpux_make_needs_suffix_list
-
-# The main all target
-all:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/providers/stub/directorystart
-
-# The main clean target
-clean:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/providers/stub/clean
-
-# 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/providers/stub/CMakeFiles/tsp_stub_server.dir/rule:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/providers/stub/CMakeFiles/tsp_stub_server.dir/rule
-
-# Convenience name for target.
-tsp_stub_server: src/providers/stub/CMakeFiles/tsp_stub_server.dir/rule
-
-# target for object file
-glue_stub.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/providers/stub/CMakeFiles/tsp_stub_server.dir/build.make src/providers/stub/CMakeFiles/tsp_stub_server.dir/glue_stub.o
-
-# target for object file
-server_main.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/providers/stub/CMakeFiles/tsp_stub_server.dir/build.make src/providers/stub/CMakeFiles/tsp_stub_server.dir/server_main.o
-
-# 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 "... install"
-	@echo "... rebuild_cache"
-	@echo "... tsp_stub_server"
-
-
-
-#=============================================================================
-# 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:
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
-
Index: src/providers/stub/server_main.c
===================================================================
--- src/providers/stub/server_main.c	(révision 4)
+++ src/providers/stub/server_main.c	(révision 205)
@@ -41,30 +41,71 @@
 
 #include "tsp_provider_init.h"
 
+#if defined (WIN32)
+#include "tsp_time.h"
+typedef unsigned long sigset_t;
+#endif
+
 GLU_handle_t* GLU_stub_create();
 
+#if defined (WIN32)
+static int sigint_reveived = 0;
+/* intercept signal function : call once */
+void intrpt(int signum)
+{
+    /* managed the SIGINT signal */
+    (void) signal(SIGINT, SIG_DFL);
+    /* End of the waiting */
+    sigint_reveived = 1;
+    /* could be modified to use CreateEvent, SetEvent and WaitForSingleObject functions */
+}
+#endif
+
 int main(int argc, char *argv[])
 {
+  GLU_handle_t* GLU_stub;
+
+/* Managing thr SIGINT signal */
+#if defined (WIN32)
+  /* intercept SIGINT signal */
+  if ( SIG_ERR == signal(SIGINT, intrpt))
+  {
+    STRACE_ERROR(("Error initialisation signal intercept function"));
+    exit(1);
+  }
+#else
   sigset_t allsigs;
   int whatsig;
 
+  /* Allows the SIGINT signal */
+  /* so the sigwait function may stop on a SIGINT signal */
   sigemptyset(&allsigs);
   sigaddset(&allsigs, SIGINT);
   sigprocmask(SIG_BLOCK, &allsigs, NULL);
+#endif
 
   printf ("#===================================================================#\n");
   printf ("# Launching <StubbedServer> for generation of 1000 Symbols at 100Hz #\n");
   printf ("#===================================================================#\n");
 
-  GLU_handle_t* GLU_stub = GLU_stub_create();
+  GLU_stub = GLU_stub_create();
 
   /* Init server */
   if(TSP_STATUS_OK==TSP_provider_init(GLU_stub,&argc, &argv)) {
     if (TSP_STATUS_OK!=TSP_provider_run(TSP_ASYNC_REQUEST_SIMPLE | TSP_ASYNC_REQUEST_NON_BLOCKING)) {
-      return -1;
+        return -1;
     }
     TSP_provider_urls(TSP_PUBLISH_URLS_PRINT | TSP_PUBLISH_URLS_FILE);
+#if defined (WIN32)
+    /* Wait until the intercept signal function is call */
+    while (!sigint_reveived)
+    {
+        tsp_usleep(1000);
+    }
+#else
+    /* wait until a SIGINT signal */
     sigwait(&allsigs, &whatsig);
+#endif
     TSP_provider_end();
   }
 
Index: src/providers/stub/CMakeLists.txt
===================================================================
--- src/providers/stub/CMakeLists.txt	(révision 4)
+++ src/providers/stub/CMakeLists.txt	(révision 205)
@@ -5,8 +5,16 @@
 IF (BUILD_XMLRPC)
     ADD_DEFINITIONS(${LIBWWW_CFLAGS})
     SET(LIBS ${LIBS} ${XMLRPCC_ABYSS_SERVER_LIBRARIES} ${LIBWWW_LIBRARIES})
-ENDIF (BUILD_XMLRPC)    
-SET(LIBS ${LIBS} m  pthread)
+ENDIF (BUILD_XMLRPC)
+
+# AP : Migration sous Windows
+IF (NOT WIN32)
+	SET(LIBS ${LIBS} m)
+ENDIF (NOT WIN32)
+
+SET(LIBS ${LIBS} ${PTHREAD_LIBRARY_NAME} ${TSP_WIN32_LIB})
+	
 TARGET_LINK_LIBRARIES(tsp_stub_server ${LIBS})
 
-ADD_DEPENDENCIES(tsp_stub_server  tsp_calc tsp_common tsp_services tsp_provider)
+ADD_DEPENDENCIES(tsp_stub_server tsp_calc tsp_common tsp_services tsp_provider)
+TSP_PROGRAM_INSTALL(tsp_stub_server)
Index: src/providers/generic_reader/Makefile
===================================================================
--- src/providers/generic_reader/Makefile	(révision 4)
+++ src/providers/generic_reader/Makefile	(révision 205)
@@ -1,84 +0,0 @@
-# CMAKE generated file: DO NOT EDIT!
-# Generated by "Unix Makefiles" Generator, CMake Version 2.2
-
-#=============================================================================
-# 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/noularde/TSP/tsp_all/tsp
-
-# The top-level build directory on which CMake was run.
-CMAKE_BINARY_DIR = /home/noularde/TSP/tsp_all/tsp
-
-#=============================================================================
-# Special targets provided by cmake.
-
-# Default target executed when no arguments are given to make.
-default_target: all
-
-# Special rule to run installation script.
-install: all
-	$(CMAKE_COMMAND) -P cmake_install.cmake
-
-# Special rule to re-run CMake using make.
-rebuild_cache:
-	@echo "Running CMake to regenerate build system..."
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Special rule to re-run CMake cache editor using make.
-edit_cache:
-	@echo "Running CMake cache editor..."
-	$(CMAKE_EDIT_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Suppress display of executed commands.
-$(VERBOSE).SILENT:
-
-# Disable implicit rules so canoncical targets will work.
-.SUFFIXES:
-
-.SUFFIXES: .hpux_make_needs_suffix_list
-
-# The main all target
-all:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/providers/generic_reader/directorystart
-
-# The main clean target
-clean:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/providers/generic_reader/clean
-
-# clear depends
-depend:
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
-
-# 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 "... install"
-	@echo "... rebuild_cache"
-
-
-
-#=============================================================================
-# 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:
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
-
Index: src/providers/generic_reader/macsim_fmt.c
===================================================================
--- src/providers/generic_reader/macsim_fmt.c	(révision 4)
+++ src/providers/generic_reader/macsim_fmt.c	(révision 205)
@@ -42,7 +42,7 @@
 #include <malloc.h>
 #include <ctype.h>
 
-#include <bb_core.h>
+/* #include <bb_core.h> */
 #include <tsp_rpc.h>
 #include <generic_reader.h>
 #include <macsim_fmt.h>
Index: src/providers/generic_reader/generic_reader_main.c
===================================================================
--- src/providers/generic_reader/generic_reader_main.c	(révision 4)
+++ src/providers/generic_reader/generic_reader_main.c	(révision 205)
@@ -138,6 +138,7 @@
     TSP_provider_urls(TSP_PUBLISH_URLS_PRINT);
     /* Wait provider and through catched signals */
     sigwait(&allsigs, &whatsig);
+
     TSP_provider_end();
     retcode = TSP_STATUS_OK;    
   } 
Index: src/providers/generic_reader/glu_genreader.c
===================================================================
--- src/providers/generic_reader/glu_genreader.c	(révision 4)
+++ src/providers/generic_reader/glu_genreader.c	(révision 205)
@@ -46,8 +46,6 @@
 #include <tsp_common.h>
 #include <glu_genreader.h>
 
-#define _LIBUTIL_REENTRANT 1
-#include "libUTIL.h"
 
 #define GLU_STREAM_INIT_USAGE "TSP RES Reader usage : filename[.res]  [-eof N]\n\t\twait N seconds after EOF to check file increment, default = 0 (NO WAIT)\n"
 #define GLU_RES_FILE_ARG_NUMBER 1
Index: src/providers/generic_reader/CMakeLists.txt
===================================================================
--- src/providers/generic_reader/CMakeLists.txt	(révision 0)
+++ src/providers/generic_reader/CMakeLists.txt	(révision 205)
@@ -0,0 +1,22 @@
+
+ADD_EXECUTABLE(tsp_generic_reader 
+  macsim_fmt.c
+  glu_genreader.c 
+  generic_reader.c 
+  generic_reader_main.c)
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+
+SET(LIBS tsp_provider tsp_common tsp_services)
+ADD_DEPENDENCIES(tsp_generic_reader ${LIBS} ${TSP_WIN32_LIB})
+
+IF (BUILD_XMLRPC)
+    ADD_DEFINITIONS(${LIBWWW_CFLAGS})
+    SET(LIBS ${LIBS} ${XMLRPCC_ABYSS_SERVER_LIBRARIES} ${LIBWWW_LIBRARIES})
+ENDIF (BUILD_XMLRPC)
+
+SET(LIBS ${LIBS} ${PTHREAD_LIBRARY_NAME} ${TSP_WIN32_LIB})
+	
+TARGET_LINK_LIBRARIES(tsp_generic_reader ${LIBS})
+
+TSP_PROGRAM_INSTALL(tsp_generic_reader)
