2 ### Shell script to create a ROOT loadable GCC shared lib out of .cxx source code
4 ### NvE 23-may-2000 UU-SAP Utrecht
6 ### Name of the produced shared libraries
10 ### Some MAC specific settings
11 export MACOSX_DEPLOYMENT_TARGET=10.3
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="-c -g0 -ansi -pedantic -Wall -Wno-long-long -I$ROOTSYS/include -I$ALIROOT/RALICE"
20 echo "gccroot = " $gccroot
22 ### Go to the directory with the source files
25 ### Create the dictionary files
26 rootcint -f zzzrwa98dict.cxx -c -I$ALIROOT/RALICE RWA98Headers.h RWA98LinkDef.h
28 ### Compile and create the ROOT loadable shared library
33 # Creating ralice.so library
34 g++ -v -bundle -undefined dynamic_lookup -o $lib1 *.o
36 # Creating ralice.dylib library
37 g++ -v -dynamiclib -undefined dynamic_lookup -single_module -o $lib2 *.o
38 ### On some systems the following extra "-read_only_relocs" flag might be needed
39 # g++ -v -dynamiclib -undefined dynamic_lookup -single_module -read_only_relocs -o $lib2 *.o
44 ### Move the created lib to the scripts directory and go there
50 echo '*** macgcclib.sh done. Results in rwa98.so and rwa98.dylib'