Index: snovis/trunk/obuild/DOS/build_dll_snovis.bat
===================================================================
--- snovis/trunk/obuild/DOS/build_dll_snovis.bat	(revision 101)
+++ snovis/trunk/obuild/DOS/build_dll_snovis.bat	(revision 134)
@@ -95,19 +95,19 @@
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_1
+SET snova_platform=Darwin
+:end_if_platform_1
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
 FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_1
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_3
 SET bhep_home=/Users/barrand/dev/exp/nemo/bhep/v1r4p2
-:end_if_platform_1
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_3
-SET bhep_platform=Darwin
 :end_if_platform_3
 SET obuild_platform_result=
@@ -125,29 +125,39 @@
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_7
+SET CLHEP_home=/usr/local/CLHEP/2.0.3.1
+:end_if_platform_7
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_9
+SET Geant4_home=/usr/local/geant4/8.2
+:end_if_platform_9
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
 FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_7
-SET snova_platform=Darwin
-:end_if_platform_7
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_9
-SET CLHEP_home=/usr/local/CLHEP/2.0.3.1
-:end_if_platform_9
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_10
+SET obuild_cxx_command=c++
+:end_if_platform_10
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_11
-SET Geant4_home=/usr/local/geant4/8.2
+SET obuild_cxx_command=c++
 :end_if_platform_11
 SET obuild_platform_result=
@@ -155,10 +165,32 @@
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_12
+SET obuild_cxx_command=cxx
+:end_if_platform_12
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_13
+SET obuild_cxx_command=cl.exe
+:end_if_platform_13
+SET obuild_platform_result=
+IF "%obuild_cxx_command%" == ""  ECHO Variable obuild_cxx_command not defined.  && GOTO obuild_return
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
 FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_12
-SET obuild_cxx_command=c++
-:end_if_platform_12
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_14
+SET obuild_cxx_optimize=-O
+:end_if_platform_14
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -168,7 +200,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_13
-SET obuild_cxx_command=c++
-:end_if_platform_13
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_15
+SET obuild_cxx_optimize=-O
+:end_if_platform_15
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -176,26 +208,4 @@
 IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
 FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_14
-SET obuild_cxx_command=cxx
-:end_if_platform_14
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_15
-SET obuild_cxx_command=cl.exe
-:end_if_platform_15
-SET obuild_platform_result=
-IF "%obuild_cxx_command%" == ""  ECHO Variable obuild_cxx_command not defined.  && GOTO obuild_return
-
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
@@ -207,10 +217,31 @@
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_17
+SET obuild_cxx_optimize=/O2
+:end_if_platform_17
+SET obuild_platform_result=
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_18
+SET obuild_cxx_debug=-g
+:end_if_platform_18
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
 FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_17
-SET obuild_cxx_optimize=-O
-:end_if_platform_17
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_19
+SET obuild_cxx_debug=-g
+:end_if_platform_19
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -218,25 +249,4 @@
 IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
 FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_18
-SET obuild_cxx_optimize=-O
-:end_if_platform_18
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_19
-SET obuild_cxx_optimize=/O2
-:end_if_platform_19
-SET obuild_platform_result=
-
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
@@ -248,19 +258,20 @@
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_21
+SET obuild_cxx_debug=/ZI /Od
+:end_if_platform_21
+SET obuild_platform_result=
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
 FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_21
-SET obuild_cxx_debug=-g
-:end_if_platform_21
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_22
-SET obuild_cxx_debug=-g
+SET obuild_cxx_options=-fPIC
 :end_if_platform_22
 SET obuild_platform_result=
@@ -272,42 +283,21 @@
 SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_23
-SET obuild_cxx_debug=/ZI /Od
+SET obuild_cxx_options=/nologo /DWIN32 /MD /GX /GR /W3
 :end_if_platform_23
 SET obuild_platform_result=
 
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_24
-SET obuild_cxx_options=-fPIC
-:end_if_platform_24
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_25
-SET obuild_cxx_options=/nologo /DWIN32 /MD /GX /GR /W3
-:end_if_platform_25
-SET obuild_platform_result=
-
-IF NOT %obuild_debug% == yes GOTO else_if_db_build_dll_snovis_sh_26
+IF NOT %obuild_debug% == yes GOTO else_if_db_build_dll_snovis_sh_24
   SET obuild_cxx_debug_local=%obuild_cxx_debug%
-  GOTO end_if_db_build_dll_snovis_sh_26
-:else_if_db_build_dll_snovis_sh_26
+  GOTO end_if_db_build_dll_snovis_sh_24
+:else_if_db_build_dll_snovis_sh_24
   SET obuild_cxx_debug_local=
-:end_if_db_build_dll_snovis_sh_26
-
-IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_dll_snovis_sh_27
+:end_if_db_build_dll_snovis_sh_24
+
+IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_dll_snovis_sh_25
   SET obuild_cxx_optimize_local=%obuild_cxx_optimize%
-  GOTO end_if_opt_build_dll_snovis_sh_27
-:else_if_opt_build_dll_snovis_sh_27
+  GOTO end_if_opt_build_dll_snovis_sh_25
+:else_if_opt_build_dll_snovis_sh_25
   SET obuild_cxx_optimize_local=
-:end_if_opt_build_dll_snovis_sh_27
+:end_if_opt_build_dll_snovis_sh_25
 
 
@@ -466,7 +456,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_37
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_35
 SET obuild_cxx_includes=%obuild_cxx_includes% -I/System/Library/Frameworks/OpenGL.framework/Headers
-:end_if_platform_37
+:end_if_platform_35
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -476,7 +466,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_38
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_36
 SET obuild_cxx_includes=%obuild_cxx_includes% -I${OBUILD_OPENGL_HOME}/include
-:end_if_platform_38
+:end_if_platform_36
 SET obuild_platform_result=
 
@@ -522,6 +512,26 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_51
+SET obuild_linked_libraries=%obuild_linked_libraries% -framework OpenGL -framework AGL
+:end_if_platform_51
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_52
+SET obuild_linked_libraries=%obuild_linked_libraries% -framework ApplicationServices
+:end_if_platform_52
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_53
-SET obuild_linked_libraries=%obuild_linked_libraries% -framework OpenGL -framework AGL
+SET obuild_linked_libraries=%obuild_linked_libraries% -L/usr/lib -lGLU -lGL -lm
 :end_if_platform_53
 SET obuild_platform_result=
@@ -529,9 +539,9 @@
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_54
-SET obuild_linked_libraries=%obuild_linked_libraries% -framework ApplicationServices
+SET obuild_linked_libraries=%obuild_linked_libraries% glu32.lib opengl32.lib gdi32.lib user32.lib
 :end_if_platform_54
 SET obuild_platform_result=
@@ -539,9 +549,9 @@
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_55
-SET obuild_linked_libraries=%obuild_linked_libraries% -L/usr/lib -lGLU -lGL -lm
+SET obuild_linked_libraries=%obuild_linked_libraries% -L${OBUILD_OPENGL_HOME}/lib -lGLU -lGL -lm
 :end_if_platform_55
 SET obuild_platform_result=
@@ -549,30 +559,10 @@
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_56
-SET obuild_linked_libraries=%obuild_linked_libraries% glu32.lib opengl32.lib gdi32.lib user32.lib
+SET obuild_linked_libraries=%obuild_linked_libraries% -lpthread
 :end_if_platform_56
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_57
-SET obuild_linked_libraries=%obuild_linked_libraries% -L${OBUILD_OPENGL_HOME}/lib -lGLU -lGL -lm
-:end_if_platform_57
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_58
-SET obuild_linked_libraries=%obuild_linked_libraries% -lpthread
-:end_if_platform_58
 SET obuild_platform_result=
 
