@ECHO OFF SETLOCAL REM # REM # File produced by the obuild tool version 1.0 REM # for the package snovis with version v1r1. REM # REM #//////////////////////////////////////////////// REM # Usage : REM # DOS> CD some_path\pack\version\obuild REM # DOS> DOS\build_G4LabCore REM # REM #//////////////////////////////////////////////// REM #//////////////////////////////////////////////// REM #/// Get path of this file : REM #//////////////////////////////////////////////// SET obuild_snovis_path=%~dp0 REM # Remove ending \obuild\DOS\ SET obuild_snovis_path=%obuild_snovis_path:~0,-12% REM #//////////////////////////////////////////////// REM #/// Treat arguments : REM #//////////////////////////////////////////////// SET obuild_verbose=no SET obuild_debug=no SET obuild_optimize=yes SET obuild_set_x=no :next_arg IF "%1%" == "" GOTO end_args IF NOT "%1%" == "-v" GOTO end_if_v SET obuild_verbose=yes SHIFT GOTO next_arg :end_if_v IF NOT "%1%" == "-g" GOTO end_if_g SET obuild_debug=yes SHIFT GOTO next_arg :end_if_g IF NOT "%1%" == "-x" GOTO end_if_x SET obuild_set_x=yes SHIFT GOTO next_arg :end_if_x :end_args REM #//////////////////////////////////////////////// REM #/// End arguments. REM #//////////////////////////////////////////////// IF %obuild_set_x% == yes ECHO ON IF %obuild_debug% == yes SET obuild_optimize=no IF "%OBUILD_PLATFORM%" == "" ( IF "%OS%" == "" ECHO Environment variable OS not found. & GOTO obuild_return SET obuild_platform=%OS% ) ELSE ( SET obuild_platform=%OBUILD_PLATFORM% ) IF "%obuild_platform%" == "" ( ECHO obuild_platform variable not defined. GOTO obuild_return ) IF "%OBUILD_DIR_BIN%" == "" ( SET obuild_dir_bin=bin_obuild ) ELSE ( SET obuild_dir_bin=%OBUILD_DIR_BIN% ) IF "%obuild_dir_bin%" == "" ( ECHO obuild_dir_bin variable not defined. GOTO obuild_return ) IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%" IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%" IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_platform.exe" ( cl.exe /nologo /DWIN32 /MD /O2 /W3 /GX /GR /Fe"%obuild_snovis_path%\%obuild_dir_bin%\obuild_platform.exe" "%obuild_snovis_path%\obuild\cpp\obuild_platform.cpp" 1> NUL IF EXIST obuild_platform.obj DEL obuild_platform.obj ) 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_0 SET obuild_cxx_command=cl.exe :end_if_platform_0 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% 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_1 SET obuild_cxx_optimize=/O2 :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% 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_2 SET obuild_cxx_debug=/ZI /Od :end_if_platform_2 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_3 SET obuild_cxx_options=/nologo /DWIN32 /MD /GX /GR /W3 :end_if_platform_3 SET obuild_platform_result= IF NOT %obuild_debug% == yes GOTO else_if_db_build_lib_G4LabCore_sh_4 SET obuild_cxx_debug_local=%obuild_cxx_debug% GOTO end_if_db_build_lib_G4LabCore_sh_4 :else_if_db_build_lib_G4LabCore_sh_4 SET obuild_cxx_debug_local= :end_if_db_build_lib_G4LabCore_sh_4 IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_lib_G4LabCore_sh_5 SET obuild_cxx_optimize_local=%obuild_cxx_optimize% GOTO end_if_opt_build_lib_G4LabCore_sh_5 :else_if_opt_build_lib_G4LabCore_sh_5 SET obuild_cxx_optimize_local= :end_if_opt_build_lib_G4LabCore_sh_5 SET obuild_cxx_includes=/I"%obuild_snovis_path%\source" IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\lib_G4LabCore" RMDIR /S /Q "%obuild_snovis_path%\%obuild_dir_bin%\lib_G4LabCore" IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\lib_G4LabCore" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%\lib_G4LabCore" @IF %obuild_verbose% == yes @ECHO ON cd "%obuild_snovis_path%\%obuild_dir_bin%" %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_G4LabCore\Transform3D.obj /Tp"..\source\G4Lab\cxx\Transform3D.cxx" 1> cl_exe_error @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL cl_exe_error cd "%obuild_snovis_path%\obuild" cd "%obuild_snovis_path%\%obuild_dir_bin%" %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_G4LabCore\Polyhedron.obj /Tp"..\source\G4Lab\cxx\Polyhedron.cxx" 1> cl_exe_error @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL cl_exe_error cd "%obuild_snovis_path%\obuild" cd "%obuild_snovis_path%\%obuild_dir_bin%" %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_G4LabCore\GeometryVisitor.obj /Tp"..\source\G4Lab\cxx\GeometryVisitor.cxx" 1> cl_exe_error @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL cl_exe_error cd "%obuild_snovis_path%\obuild" cd "%obuild_snovis_path%\%obuild_dir_bin%" %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_G4LabCore\Tree.obj /Tp"..\source\G4Lab\cxx\Tree.cxx" 1> cl_exe_error @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL cl_exe_error cd "%obuild_snovis_path%\obuild" cd "%obuild_snovis_path%\%obuild_dir_bin%" %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_G4LabCore\Trajectory.obj /Tp"..\source\G4Lab\cxx\Trajectory.cxx" 1> cl_exe_error @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL cl_exe_error cd "%obuild_snovis_path%\obuild" cd "%obuild_snovis_path%\%obuild_dir_bin%" %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_G4LabCore\State.obj /Tp"..\source\G4Lab\cxx\State.cxx" 1> cl_exe_error @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL cl_exe_error cd "%obuild_snovis_path%\obuild" cd "%obuild_snovis_path%\%obuild_dir_bin%" %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_G4LabCore\SteppingAction.obj /Tp"..\source\G4Lab\cxx\SteppingAction.cxx" 1> cl_exe_error @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL cl_exe_error cd "%obuild_snovis_path%\obuild" cd "%obuild_snovis_path%\%obuild_dir_bin%" %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_G4LabCore\TrackingAction.obj /Tp"..\source\G4Lab\cxx\TrackingAction.cxx" 1> cl_exe_error @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL cl_exe_error cd "%obuild_snovis_path%\obuild" cd "%obuild_snovis_path%\%obuild_dir_bin%" %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_G4LabCore\SoG4RunManager.obj /Tp"..\source\G4Lab\cxx\SoG4RunManager.cxx" 1> cl_exe_error @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL cl_exe_error cd "%obuild_snovis_path%\obuild" cd "%obuild_snovis_path%\%obuild_dir_bin%" %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_G4LabCore\SoVisitedVolume.obj /Tp"..\source\G4Lab\cxx\SoVisitedVolume.cxx" 1> cl_exe_error @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL cl_exe_error cd "%obuild_snovis_path%\obuild" cd "%obuild_snovis_path%\%obuild_dir_bin%" %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_G4LabCore\SoG4Trajectories.obj /Tp"..\source\G4Lab\cxx\SoG4Trajectories.cxx" 1> cl_exe_error @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL cl_exe_error cd "%obuild_snovis_path%\obuild" cd "%obuild_snovis_path%\%obuild_dir_bin%" %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_G4LabCore\PhysicalVolumeAccessor.obj /Tp"..\source\G4Lab\cxx\PhysicalVolumeAccessor.cxx" 1> cl_exe_error @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL cl_exe_error cd "%obuild_snovis_path%\obuild" cd "%obuild_snovis_path%\%obuild_dir_bin%" %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_G4LabCore\TrajectoryContainerAccessor.obj /Tp"..\source\G4Lab\cxx\TrajectoryContainerAccessor.cxx" 1> cl_exe_error @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL cl_exe_error cd "%obuild_snovis_path%\obuild" cd "%obuild_snovis_path%\%obuild_dir_bin%" %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_G4LabCore\TrajectoryAccessor.obj /Tp"..\source\G4Lab\cxx\TrajectoryAccessor.cxx" 1> cl_exe_error @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL cl_exe_error cd "%obuild_snovis_path%\obuild" cd "%obuild_snovis_path%\%obuild_dir_bin%" %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_G4LabCore\PhysicsTableAccessor.obj /Tp"..\source\G4Lab\cxx\PhysicsTableAccessor.cxx" 1> cl_exe_error @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL cl_exe_error cd "%obuild_snovis_path%\obuild" cd "%obuild_snovis_path%\%obuild_dir_bin%" %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_G4LabCore\HitsCollectionAccessor.obj /Tp"..\source\G4Lab\cxx\HitsCollectionAccessor.cxx" 1> cl_exe_error @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL cl_exe_error cd "%obuild_snovis_path%\obuild" cd "%obuild_snovis_path%\%obuild_dir_bin%" %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_G4LabCore\DigitsCollectionAccessor.obj /Tp"..\source\G4Lab\cxx\DigitsCollectionAccessor.cxx" 1> cl_exe_error @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL cl_exe_error cd "%obuild_snovis_path%\obuild" cd "%obuild_snovis_path%\%obuild_dir_bin%" %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_G4LabCore\Manager.obj /Tp"..\source\G4Lab\cxx\Manager.cxx" 1> cl_exe_error @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL cl_exe_error cd "%obuild_snovis_path%\obuild" @IF %obuild_verbose% == yes @ECHO OFF 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_linker_command=link.exe :end_if_platform_25 SET obuild_platform_result= IF "%obuild_cxx_linker_command%" == "" ECHO Variable obuild_cxx_linker_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% 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_26 SET obuild_cxx_linker_debug=/DEBUG :end_if_platform_26 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_27 SET obuild_cxx_linker_options=/nologo :end_if_platform_27 SET obuild_platform_result= IF NOT %obuild_debug% == yes GOTO else_if_db_build_lib_G4LabCore_sh_28 SET obuild_cxx_linker_debug_local=%obuild_cxx_linker_debug% GOTO end_if_db_build_lib_G4LabCore_sh_28 :else_if_db_build_lib_G4LabCore_sh_28 SET obuild_cxx_linker_debug_local= :end_if_db_build_lib_G4LabCore_sh_28 IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_lib_G4LabCore_sh_29 SET obuild_cxx_linker_optimize_local=%obuild_cxx_linker_optimize% GOTO end_if_opt_build_lib_G4LabCore_sh_29 :else_if_opt_build_lib_G4LabCore_sh_29 SET obuild_cxx_linker_optimize_local= :end_if_opt_build_lib_G4LabCore_sh_29 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d cd "%obuild_snovis_path%\%obuild_dir_bin%" IF EXIST .\lib_G4LabCore\tmp_objs DEL .\lib_G4LabCore\tmp_objs FOR %%f IN (.\lib_G4LabCore\*.obj) DO ECHO %%f >> .\lib_G4LabCore\tmp_objs REM # Create the archive library G4LabCore : @IF %obuild_verbose% == yes @ECHO ON lib.exe /nologo /machine:ix86 /out:.\lib_G4LabCore\G4LabCore.arc @.\lib_G4LabCore\tmp_objs @IF ERRORLEVEL 1 @GOTO obuild_return @IF %obuild_verbose% == yes @ECHO OFF REM # Build the obuild_windef.exe utility program : cl.exe /nologo /DWIN32 /MD /O2 /W3 /Feobuild_windef.exe "%obuild_snovis_path%\obuild\cpp\obuild_windef.c" 1> NUL IF EXIST obuild_windef.obj DEL obuild_windef.obj REM # Building the .def file : @IF %obuild_verbose% == yes @ECHO ON dumpbin.exe /symbols /out:.\lib_G4LabCore\tmp .\lib_G4LabCore\G4LabCore.arc 1> dumpbin_exe_error .\lib_G4LabCore\G4LabCore.arc @IF ERRORLEVEL 1 @TYPE dumpbin_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL dumpbin_exe_error @IF %obuild_verbose% == yes @ECHO OFF .\obuild_windef.exe G4LabCore < .\lib_G4LabCore\tmp > .\lib_G4LabCore\G4LabCore.def REM # Building the linking library : REM # It produces a .exp file. @IF %obuild_verbose% == yes @ECHO ON lib.exe /nologo /machine:ix86 /out:.\G4LabCore.lib /def:.\lib_G4LabCore\G4LabCore.def 1> lib_exe_error @IF ERRORLEVEL 1 @TYPE lib_exe_error && @GOTO obuild_return @IF NOT ERRORLEVEL 1 @DEL lib_exe_error @IF %obuild_verbose% == yes @ECHO OFF REM # Building the DLL : IF EXIST .\G4LabCore.dll DEL .\G4LabCore.dll @IF %obuild_verbose% == yes @ECHO ON link.exe /nologo /dll /out:.\G4LabCore.dll .\G4LabCore.exp .\lib_G4LabCore\G4LabCore.arc %obuild_linked_libraries% @IF %obuild_verbose% == yes @ECHO OFF cd "%obuild_pwd_snovis_0%" SET obuild_pwd_snovis_0= REM # Some cleanup : IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\lib_G4LabCore\tmp_objs" DEL "%obuild_snovis_path%\%obuild_dir_bin%\lib_G4LabCore\tmp_objs" IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\G4LabCore.exp" DEL "%obuild_snovis_path%\%obuild_dir_bin%\G4LabCore.exp" :obuild_return ENDLOCAL @ECHO ON