From 6c5f9a1b9bd92275a71fd4b1c89df53c2852ad76 Mon Sep 17 00:00:00 2001 From: nick Date: Wed, 1 Dec 2004 08:51:56 +0000 Subject: [PATCH] 01-dev-2004 NvE Installation scripts modified to make use of environment variable ALIROOT which should contain the path to the directory where AliRoot resides. This ALIROOT environment variable fulfills a comparable function as the ROOTSYS environment variable for the ROOT system. Also installation script macgcclib.sh for gcc on MAC systems introduced. --- RALICE/wa98/scripts/alphacxxlib.sh | 14 ++++++--- RALICE/wa98/scripts/gcclib.sh | 19 +++++++----- RALICE/wa98/scripts/hpcclib.sh | 16 +++++++--- RALICE/wa98/scripts/macgcclib.sh | 50 ++++++++++++++++++++++++++++++ RALICE/wa98/scripts/mklibs.bat | 22 +++++++++---- 5 files changed, 97 insertions(+), 24 deletions(-) create mode 100644 RALICE/wa98/scripts/macgcclib.sh diff --git a/RALICE/wa98/scripts/alphacxxlib.sh b/RALICE/wa98/scripts/alphacxxlib.sh index 5aef828b1ee..297427cc333 100644 --- a/RALICE/wa98/scripts/alphacxxlib.sh +++ b/RALICE/wa98/scripts/alphacxxlib.sh @@ -6,16 +6,16 @@ ### Name of the produced shared library lib=rwa98.so -### The ALICE source directory -alice=$HOME/cxx/source/alice - ### The option string for ALPHA-CXX shared lib compilation and linking *** ### For the ALPHA-CXX ROOT loadable shared lib the strict requirements are *** ### dropped to avoid many warnings from the rootcint generated code *** -alpharoot="-x cxx -g0 -shared -w1 -I$ROOTSYS/include -I$alice -o $lib" +alpharoot="-x cxx -g0 -shared -w1 -I$ROOTSYS/include -I$ALIROOT/RALICE -o $lib" + +### Go to the directory with the source files +cd $ALIROOT/RALICE/wa98 ### Create the dictionary files -rootcint zzzrwa98dict.cxx -c -I$alice RWA98Headers.h RWA98LinkDef.h +rootcint zzzrwa98dict.cxx -c -I$ALIROOT/RALICE RWA98Headers.h RWA98LinkDef.h ### Compile and create the ROOT loadable shared library cxx $alpharoot *.cxx @@ -24,5 +24,9 @@ rm zzzrwa98dict.* rm *.o rm so_locations +### Move the created lib to the scripts directory and go there +mv $lib scripts +cd scripts + echo ' ' echo '*** alphacxxlib done. Result in ' $lib diff --git a/RALICE/wa98/scripts/gcclib.sh b/RALICE/wa98/scripts/gcclib.sh index c7cf6281ba8..aebcd22592e 100644 --- a/RALICE/wa98/scripts/gcclib.sh +++ b/RALICE/wa98/scripts/gcclib.sh @@ -5,27 +5,30 @@ # ### Name of the produced shared library lib=rwa98.so -# -### The ALICE source directory -alice=$HOME/cxx/source/alice # ### The option string for GCC shared lib compilation and linking *** ### For the GCC ROOT loadable shared lib the strict requirements are *** ### dropped to avoid many warnings from the rootcint generated code *** -gccroot="-shared -g0 -ansi -pedantic -Wall -Wno-long-long -I$ROOTSYS/include -I$alice -o $lib" +gccroot="-shared -g0 -ansi -pedantic -Wall -Wno-long-long -I$ROOTSYS/include -I$ALIROOT/RALICE -o $lib" # echo "lib = " $lib -echo "alice = " $alice echo "gccroot = " $gccroot # +### Go to the directory with the source files +cd $ALIROOT/RALICE/wa98 +# ### Create the dictionary files -rootcint -f zzzrwa98dict.cxx -c -I$alice RWA98Headers.h RWA98LinkDef.h +rootcint -f zzzrwa98dict.cxx -c -I$ALIROOT/RALICE RWA98Headers.h RWA98LinkDef.h # ### Compile and create the ROOT loadable shared library g++ $gccroot *.cxx # -rm zzzwa98dict.* +rm zzzrwa98dict.* rm *.o # +### Move the created lib to the scripts directory and go there +mv $lib scripts +cd scripts +# echo ' ' -echo '*** gcclib done. Result in ralice.so' +echo '*** gcclib done. Result in ' $lib diff --git a/RALICE/wa98/scripts/hpcclib.sh b/RALICE/wa98/scripts/hpcclib.sh index 42eccbe34e1..1954a8e60ff 100644 --- a/RALICE/wa98/scripts/hpcclib.sh +++ b/RALICE/wa98/scripts/hpcclib.sh @@ -6,12 +6,14 @@ ### The option strings for HP-CC shared lib compilation and linking *** ### For the HP-CC ROOT loadable shared lib the strict requirements are *** ### dropped to avoid many warnings from the rootcint generated code *** - -hpcomp="-c -s -z +z +a1 +w +DAportable -I$ROOTSYS/include" -hproot="-c -s -z +z +a1 +DAportable -I$ROOTSYS/include" +hpcomp="-c -s -z +z +a1 +w +DAportable -I$ROOTSYS/include -I$ALIROOT/RALICE" +hproot="-c -s -z +z +a1 +DAportable -I$ROOTSYS/include -I$ALIROOT/RALICE" hplink="-L$ROOTSYS/lib/ -l*.sl -lm" -rootcint zzzrwa98dict.cxx -c RWA98Headers.h RWA98LinkDef.h +### Go to the directory with the source files +cd $ALIROOT/RALICE/wa98 + +rootcint zzzrwa98dict.cxx -c -I$ALIROOT/RALICE RWA98Headers.h RWA98LinkDef.h CC $hproot *.cxx @@ -20,4 +22,8 @@ CC -b -o rwa98.sl *.o rm zzzrwa98dict.* rm *.o -echo '*** hpcclib done. Result in rwa98.sl' +### Move the created lib to the scripts directory and go there +mv rwa98.sl scripts +cd scripts + +echo '*** hpcclib.sh done. Result in rwa98.sl' diff --git a/RALICE/wa98/scripts/macgcclib.sh b/RALICE/wa98/scripts/macgcclib.sh new file mode 100644 index 00000000000..4139a2e9600 --- /dev/null +++ b/RALICE/wa98/scripts/macgcclib.sh @@ -0,0 +1,50 @@ +#!/bin/sh +### Shell script to create a ROOT loadable GCC shared lib out of .cxx source code +### +### NvE 23-may-2000 UU-SAP Utrecht +# +### Name of the produced shared libraries +lib1=rwa98.so +lib2=rwa98.dylib +# +### Some MAC specific settings +export MACOSX_DEPLOYMENT_TARGET=10.3 +unset LD_PREBIND +# +### The option string for GCC shared lib compilation and linking *** +### For the GCC ROOT loadable shared lib the strict requirements are *** +### dropped to avoid many warnings from the rootcint generated code *** +gccroot="-c -g0 -ansi -pedantic -Wall -Wno-long-long -I$ROOTSYS/include -I$ALIROOT/RALICE" +# +echo "lib = " $lib +echo "gccroot = " $gccroot +# +### Go to the directory with the source files +cd .. +# +### Create the dictionary files +rootcint -f zzzrwa98dict.cxx -c -I$ALIROOT/RALICE RWA98Headers.h RWA98LinkDef.h +# +### Compile and create the ROOT loadable shared library +# +# Compilation phase +g++ $gccroot *.cxx +# +# Creating ralice.so library +g++ -v -bundle -undefined dynamic_lookup -o $lib1 *.o +# +# Creating ralice.dylib library +g++ -v -dynamiclib -undefined dynamic_lookup -single_module -o $lib2 *.o +### On some systems the following extra "-read_only_relocs" flag might be needed +# g++ -v -dynamiclib -undefined dynamic_lookup -single_module -read_only_relocs -o $lib2 *.o +# +rm zzzrwa98dict.* +rm *.o +# +### Move the created lib to the scripts directory and go there +mv $lib1 scripts +mv $lib2 scripts +cd scripts +# +echo ' ' +echo '*** macgcclib.sh done. Results in rwa98.so and rwa98.dylib' diff --git a/RALICE/wa98/scripts/mklibs.bat b/RALICE/wa98/scripts/mklibs.bat index c73033d8255..c06147fd1ff 100755 --- a/RALICE/wa98/scripts/mklibs.bat +++ b/RALICE/wa98/scripts/mklibs.bat @@ -29,12 +29,12 @@ rem **************************************************************************** echo . echo === Automatic ROOT library production of files rwa98.lib and rwa98.dll === echo . - -set alice=c:\nick\cxx\source\alice\AliRoot\RALICE +rem --- Set the Wa98 source directory as working directory +cd %ALIROOT%\RALICE\wa98 rem --- The option strings for MSVC++ DLL compilation and linking --- -set mscomp=/nologo /c /TP /Ze /MD /GR /GX /I%ROOTSYS%\include /I%alice% -set msdll=/nologo /TP /Ze /MD /LD /GD /GR /GX /I%ROOTSYS%\include /I%alice% +set mscomp=/nologo /c /TP /Ze /MD /GR /GX /I%ROOTSYS%\include /I%ALIROOT%\RALICE +set msdll=/nologo /TP /Ze /MD /LD /GD /GR /GX /I%ROOTSYS%\include /I%ALIROOT%\RALICE set mslink=/ENTRY:_DllMainCRTStartup@12 %ROOTSYS%\lib\*.lib %MYLIBS%\*.lib if "%1" == "" goto export @@ -71,7 +71,7 @@ goto end echo *** Creation of ROOT loadable export libraries echo. rem --- Creation of ROOT dictionary --- -rootcint zzzrwa98dict.cxx -c -Ic:/nick/cxx/source/alice/AliRoot/RALICE RWA98Headers.h RWA98LinkDef.h +rootcint zzzrwa98dict.cxx -c -I%ALIROOT%\RALICE RWA98Headers.h RWA98LinkDef.h rem --- Compilation step --- cl %mscomp% *.cxx rem --- Creation of the export LIB --- @@ -79,6 +79,10 @@ bindexplib rwa98 *.obj > rwa98.def lib /nologo /machine:IX86 *.obj /def:rwa98.def /out:rwa98.lib rem --- Creation of the DLL --- link /nologo /machine:IX86 /DLL *.obj rwa98.exp %mslink% /OUT:rwa98.dll +rem --- Move the created libs to the SCRIPTS subdirectory +move rwa98.lib .\scripts +move rwa98.dll .\scripts +rem --- Delete intermediate files del rwa98.def del rwa98.exp goto root_clean @@ -87,11 +91,15 @@ goto root_clean echo *** Creation of ROOT loadable full version libraries echo. rem --- Creation of ROOT dictionary --- -rootcint zzzrwa98dict.cxx -c -Ic:/nick/cxx/source/alice/AliRoot/RALICE RWA98Headers.h RWA98LinkDef.h +rootcint zzzrwa98dict.cxx -c -I%ALIROOT%\RALICE RWA98Headers.h RWA98LinkDef.h rem --- Creation of the DLL --- cl %msdll% *.cxx /link %mslink% /OUT:rwa98.dll rem --- Creation of the full version LIB --- lib /nologo /machine:IX86 *.obj /out:rwa98.lib +rem --- Move the created libs to the SCRIPTS subdirectory +move rwa98.lib .\scripts +move rwa98.dll .\scripts +rem --- Delete intermediate files goto root_clean :root_clean @@ -105,4 +113,6 @@ echo *** mklibs done. goto end :end +rem --- Go back to original directory +cd scripts rem --- End of script --- -- 2.39.3