Skip to content

Instantly share code, notes, and snippets.

@ghl3
Created October 29, 2012 17:47
Show Gist options
  • Select an option

  • Save ghl3/3975167 to your computer and use it in GitHub Desktop.

Select an option

Save ghl3/3975167 to your computer and use it in GitHub Desktop.
Compile CERN ROOT script using g++
CXX=`root-config --cxx`
CXXFLAGS=`root-config --cflags`
LDFLAGS=`root-config --ldflags`
LDLIBS=`root-config --glibs`
ROOTLIBS='-lRooFit -lHtml -lMinuit -lRooFitCore -lRooStats -lHistFactory'
# Assumes that the script is in MyScript.C
# and it must contain a main() function
all: MyScript
% : %.C
g++ -g -Wall `root-config --cflags --libs` -L$(ROOTSYS)/lib $(ROOTLIBS) $? -o $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment