]>
Commit | Line | Data |
---|---|---|
c5555bc0 | 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 libraries | |
7 | lib1=ralice.so | |
8 | lib2=ralice.dylib | |
9 | # | |
10 | ### Some MAC specific settings | |
11 | export MACOSX_DEPLOYMENT_TARGET=10.3 | |
12 | unset LD_PREBIND | |
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="-c -g0 -ansi -pedantic -Wall -Wno-long-long -I$ROOTSYS/include" | |
18 | # | |
19 | echo "lib = " $lib | |
20 | echo "gccroot = " $gccroot | |
21 | # | |
22 | ### Create the dictionary files | |
23 | rootcint -f zzzralicedict.cxx -c RALICEHeaders.h RALICELinkDef.h | |
24 | # | |
25 | ### Compile and create the ROOT loadable shared library | |
26 | # | |
27 | # Compilation phase | |
28 | g++ $gccroot *.cxx | |
29 | # | |
30 | # Creating ralice.so library | |
2469b598 | 31 | g++ -v -bundle -undefined dynamic_lookup -o $lib1 *.o |
c5555bc0 | 32 | # |
33 | # Creating ralice.dylib library | |
2469b598 | 34 | g++ -v -dynamiclib -undefined dynamic_lookup -single_module -o $lib2 *.o |
c5555bc0 | 35 | ### On some systems the following extra "-read_only_relocs" flag might be needed |
2469b598 | 36 | # g++ -v -dynamiclib -undefined dynamic_lookup -single_module -read_only_relocs -o $lib2 *.o |
c5555bc0 | 37 | # |
38 | rm zzzralicedict.* | |
39 | rm *.o | |
40 | #rm so_locations | |
41 | # | |
42 | echo ' ' | |
43 | echo '*** macgcclib done. Results in ralice.so and ralice.dylib' |