29-apr-2005 Library creation scripts for Linux gcc etc... introduced.
authornick <nick@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 29 Apr 2005 05:59:22 +0000 (05:59 +0000)
committernick <nick@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 29 Apr 2005 05:59:22 +0000 (05:59 +0000)
            Argument 'float' changed to 'double' for function isnan in amanda.c
            to match gcc definition and setting of unused variable 'pi' removed
            from IceF2k.cxx.

RALICE/icepack/iceconvert/IceF2k.cxx
RALICE/icepack/iceconvert/amanda.c
RALICE/icepack/iceconvert/history.txt
RALICE/icepack/iceconvert/scripts/alphacxxlib.sh [new file with mode: 0644]
RALICE/icepack/iceconvert/scripts/amdgcclib.sh [new file with mode: 0644]
RALICE/icepack/iceconvert/scripts/gcclib.sh [new file with mode: 0644]
RALICE/icepack/iceconvert/scripts/hpcclib.sh [new file with mode: 0644]
RALICE/icepack/iceconvert/scripts/macgcclib.sh [new file with mode: 0644]

index 9de1b27471bbce5fbaf35d4925c6be8b45b7a73c..887d4fe36e514a066663476b99cb748eee73a21d 100644 (file)
@@ -161,8 +161,6 @@ void IceF2k::Loop(TTree* otree,Int_t nentries,Int_t printfreq)
 
  if (!otree) otree=new TTree("T","F2K Data");
 
- Double_t pi=acos(-1.);
-
  IceEvent* evt=new IceEvent();
 
  evt->SetTrackCopy(1);
index 78a3bf0e57444c6d648df6edf75ecf33b4c583b9..0d72c7b672960fe0064b73974eb8c8a35b81b99e 100644 (file)
@@ -37,7 +37,7 @@ long rdmc_nint(double a)
 /*******************************/
 /* Work around missing isnan() */
 /*******************************/
-int isnan(float r)
+int isnan(double r)
 {
  return 0;
 }
index 43e30db9a847acad5dfccfc4f6a35e2d39ba1971..8c7012ed6c2e7c70c6b9c9749672f80507db5d40 100644 (file)
@@ -2,3 +2,8 @@
 //                                History of updates                                //
 //////////////////////////////////////////////////////////////////////////////////////
 21-apr-2005 NvE First release of the package as a subdirectory of Ralice/icepack.
+29-apr-2005 Library creation scripts for Linux gcc etc... introduced.
+            Argument 'float' changed to 'double' for function isnan in amanda.c
+            to match gcc definition and setting of unused variable 'pi' removed
+            from IceF2k.cxx.
diff --git a/RALICE/icepack/iceconvert/scripts/alphacxxlib.sh b/RALICE/icepack/iceconvert/scripts/alphacxxlib.sh
new file mode 100644 (file)
index 0000000..29d1bcb
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/sh
+### Shell script to create a ROOT loadable ALPHA-CXX shared lib out of .cxx source code
+###
+### NvE 05-jul-2000 UU-SAP Utrecht
+
+### Name of the produced shared library
+lib=iceconvert.so
+
+### The option string for ALPHA-CXX compilation of the .c code ***
+### For the ALPHA-CXX ROOT loadable shared lib the strict requirements are ***
+### dropped to avoid many warnings from the rootcint generated code ***
+alphacomp="-c -g0 -w1 -I$ROOTSYS/include -I$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack"
+
+### 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$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack -o $lib"
+
+### Go to the directory with the source files
+cd $ALIROOT/RALICE/icepack/iceconvert
+
+### Create the dictionary files
+rootcint zzziceconvertdict.cxx -c -p -I$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack ICEConvHeaders.h ICEConvLinkDef.h
+
+### Compile and create the ROOT loadable shared library
+cxx $alphacomp *.c   
+cxx $alpharoot *.cxx   
+
+rm zzziceconvertdict.*
+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/icepack/iceconvert/scripts/amdgcclib.sh b/RALICE/icepack/iceconvert/scripts/amdgcclib.sh
new file mode 100644 (file)
index 0000000..8bda3df
--- /dev/null
@@ -0,0 +1,41 @@
+#!/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 library
+lib=iceconvert.so
+#
+### The option string for GCC compilation of the .c code ***
+### For the GCC ROOT loadable shared lib the strict requirements are ***
+### dropped to avoid many warnings from the rootcint generated code ***
+gcccomp="-c -g0 -Wall -Wno-long-long -I$ROOTSYS/include -I$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack"
+#
+### 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="-fPIC -shared -g0 -ansi -pedantic -Wall -Wno-long-long -I$ROOTSYS/include -I$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack -o $lib"
+#
+echo "lib = " $lib
+echo "gcccomp = " $gcccomp 
+echo "gccroot = " $gccroot 
+#
+### Go to the directory with the source files
+cd $ALIROOT/RALICE/icepack/iceconvert
+#
+### Create the dictionary files
+rootcint -f zzziceconvertdict.cxx -c -p -I$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack ICEConvHeaders.h ICEConvLinkDef.h
+# 
+### Compile and create the ROOT loadable shared library
+gcc $gcccomp *.c   
+g++ $gccroot *.cxx   
+# 
+rm zzziceconvertdict.*
+rm *.o
+# 
+### Move the created lib to the scripts directory and go there
+mv $lib scripts
+cd scripts
+#
+echo ' ' 
+echo '*** gcclib done. Result in ' $lib 
diff --git a/RALICE/icepack/iceconvert/scripts/gcclib.sh b/RALICE/icepack/iceconvert/scripts/gcclib.sh
new file mode 100644 (file)
index 0000000..c86c6e2
--- /dev/null
@@ -0,0 +1,41 @@
+#!/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 library
+lib=iceconvert.so
+#
+### The option string for GCC compilation of the .c code ***
+### For the GCC ROOT loadable shared lib the strict requirements are ***
+### dropped to avoid many warnings from the rootcint generated code ***
+gcccomp="-c -g0 -Wall -Wno-long-long -I$ROOTSYS/include -I$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack"
+#
+### 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$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack -o $lib"
+#
+echo "lib = " $lib
+echo "gcccomp = " $gcccomp 
+echo "gccroot = " $gccroot 
+#
+### Go to the directory with the source files
+cd $ALIROOT/RALICE/icepack/iceconvert
+#
+### Create the dictionary files
+rootcint -f zzziceconvertdict.cxx -c -p -I$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack ICEConvHeaders.h ICEConvLinkDef.h
+# 
+### Compile and create the ROOT loadable shared library
+gcc $gcccomp *.c   
+g++ $gccroot *.cxx   
+# 
+rm zzziceconvertdict.*
+rm *.o
+# 
+### Move the created lib to the scripts directory and go there
+mv $lib scripts
+cd scripts
+#
+echo ' ' 
+echo '*** gcclib done. Result in ' $lib 
diff --git a/RALICE/icepack/iceconvert/scripts/hpcclib.sh b/RALICE/icepack/iceconvert/scripts/hpcclib.sh
new file mode 100644 (file)
index 0000000..33e0b42
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+### Shell script to create a ROOT loadable HP-CC shared lib out of .cxx source code
+###
+### NvE 28-jun-1999 UU-SAP Utrecht
+#
+### 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 -I$ALIROOT/RALICE"
+hproot="-c -s -z +z +a1 +DAportable -I$ROOTSYS/include -I$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack"
+hplink="-L$ROOTSYS/lib/ -l*.sl -lm"
+
+### Go to the directory with the source files
+cd $ALIROOT/RALICE/icepack/iceconvert
+
+rootcint zzziceconvertdict.cxx -c -p -I$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack ICEConvHeaders.h ICEConvLinkDef.h
+
+CC $hpcomp *.c   
+
+CC $hproot *.cxx   
+
+CC -b -o iceconvert.sl *.o
+
+rm zzziceconvertdict.*
+rm *.o
+
+### Move the created lib to the scripts directory and go there
+mv iceconvert.sl scripts
+cd scripts
+
+echo '*** hpcclib.sh done. Result in iceconvert.sl'
diff --git a/RALICE/icepack/iceconvert/scripts/macgcclib.sh b/RALICE/icepack/iceconvert/scripts/macgcclib.sh
new file mode 100644 (file)
index 0000000..5caae7b
--- /dev/null
@@ -0,0 +1,53 @@
+#!/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=iceconvert.so
+lib2=iceconvert.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 ***
+gcccomp="-c -g0 -Wall -Wno-long-long -I$ROOTSYS/include -I$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack"
+gccroot="-c -g0 -ansi -pedantic -Wall -Wno-long-long -I$ROOTSYS/include -I$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack"
+#
+echo "lib = " $lib
+echo "gcccomp = " $gcccomp 
+echo "gccroot = " $gccroot 
+#
+### Go to the directory with the source files
+cd $ALIROOT/RALICE/icepack/iceconvert
+#
+### Create the dictionary files
+rootcint -f zzziceconvertdict.cxx -c -p -I$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack ICEConvHeaders.h ICEConvLinkDef.h
+# 
+### Compile and create the ROOT loadable shared library
+#
+# Compilation phase
+gcc $gcccomp *.c   
+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 zzziceconvertdict.*
+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 iceconvert.so and iceconvert.dylib'