f60271ca |
1 | #!/bin/sh |
2 | ### Shell script to create a ROOT loadable GCC shared lib out of .cxx source code |
3 | ### |
4 | ### NvE 23-may-2000 UU-SAP Utrecht |
5 | # |
6 | ### Name of the produced shared library |
7 | lib=iceconvert.so |
8 | # |
9 | ### The option string for GCC compilation of the .c code *** |
10 | ### For the GCC ROOT loadable shared lib the strict requirements are *** |
11 | ### dropped to avoid many warnings from the rootcint generated code *** |
12 | gcccomp="-c -g0 -Wall -Wno-long-long -I$ROOTSYS/include -I$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack" |
13 | # |
14 | ### The option string for GCC shared lib compilation and linking *** |
15 | ### For the GCC ROOT loadable shared lib the strict requirements are *** |
16 | ### dropped to avoid many warnings from the rootcint generated code *** |
17 | gccroot="-shared -g0 -ansi -pedantic -Wall -Wno-long-long -I$ROOTSYS/include -I$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack -o $lib" |
18 | # |
19 | echo "lib = " $lib |
20 | echo "gcccomp = " $gcccomp |
21 | echo "gccroot = " $gccroot |
22 | # |
23 | ### Go to the directory with the source files |
24 | cd $ALIROOT/RALICE/icepack/iceconvert |
25 | # |
26 | ### Create the dictionary files |
27 | rootcint -f zzziceconvertdict.cxx -c -p -I$ALIROOT/RALICE -I$ALIROOT/RALICE/icepack ICEConvHeaders.h ICEConvLinkDef.h |
28 | # |
29 | ### Compile and create the ROOT loadable shared library |
30 | gcc $gcccomp *.c |
a0f305cd |
31 | g++ $gccroot *.cxx *.o |
f60271ca |
32 | # |
33 | rm zzziceconvertdict.* |
34 | rm *.o |
35 | # |
36 | ### Move the created lib to the scripts directory and go there |
37 | mv $lib scripts |
38 | cd scripts |
39 | # |
40 | echo ' ' |
41 | echo '*** gcclib done. Result in ' $lib |