ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/YiChenHelperCode/CompileRootMacro
Revision: 1.1
Committed: Sun Aug 22 12:10:22 2010 UTC (14 years, 8 months ago) by chenyi
Branch: MAIN
CVS Tags: HEAD
Error occurred while calculating annotation data.
Log Message:
First version of various helper files

File Contents

# Content
1 input=$1
2 output=$2
3
4 if [ -z $1 ]; then
5 echo "Please specify the source file you want to compile"
6 exit
7 fi
8
9 if [ -z $2 ]; then
10 output=a.out
11 fi
12
13 cflags=`sh $ROOTSYS/bin/root-config --cflags`
14 libs=`sh $ROOTSYS/bin/root-config --libs`
15 cxxflags="-g -fPIC -Wno-deprecated -O -ansi -D_GNU_SOURCE -g -O2"
16 cxx="-m64"
17
18 # quick fix....
19 libs=`echo $libs | sed "s/-lz//g"`
20
21 g++ $input $libs $cflags $cxx $cxxflags -o $output