]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RALICE/scripts/macgcclib.sh
15-mar-2007 NvE AliTimestamp extended with Sidereal Time and Besselian Epoch.
[u/mrichter/AliRoot.git] / RALICE / scripts / macgcclib.sh
CommitLineData
75ad8ddd 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
7lib1=ralice.so
8lib2=ralice.dylib
9#
10### Some MAC specific settings
11export MACOSX_DEPLOYMENT_TARGET=10.3
12unset 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 ***
17gccroot="-c -g0 -ansi -pedantic -Wall -Wno-long-long -I$ROOTSYS/include"
18#
19echo "lib = " $lib
20echo "gccroot = " $gccroot
21#
22### Go to the directory with the source files
23cd ..
24#
25### Create the dictionary files
26rootcint -f zzzralicedict.cxx -c RALICEHeaders.h RALICELinkDef.h
27#
28### Compile and create the ROOT loadable shared library
29#
30# Compilation phase
31g++ $gccroot *.cxx
32#
33# Creating ralice.so library
34g++ -v -bundle -undefined dynamic_lookup -o $lib1 *.o
35#
36# Creating ralice.dylib library
37g++ -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
40#
41rm zzzralicedict.*
42rm *.o
43#
44### Move the created lib to the scripts directory and go there
45mv $lib1 scripts
46mv $lib2 scripts
47cd scripts
48#
49echo ' '
50echo '*** macgcclib done. Results in ' $lib1 ' and ' $lib2