diff --git a/.gitignore b/.gitignore index 8c6a4ddd21d2324b5212cd35417606841aa87de5..78711f71e3353cc70959bfcb10539f850842309f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ objs run *.root dict/* +lib/* tmp diff --git a/include/TSMerger.h b/include/TSMerger.h index 0e997386ac6e4a7068a5477c8f29868afe60823c..4f1e94e41a8b932ea788acc4f8b31975b46a9c42 100644 --- a/include/TSMerger.h +++ b/include/TSMerger.h @@ -7,7 +7,7 @@ #include -#include "Print.h" +#include "print.h" #include #include diff --git a/makefile b/makefile index 23c31a208f9905f574b471af8b43e7d00726615a..736addc5e1fa7a0890319f4fd3e49e0ebd6fea62 100644 --- a/makefile +++ b/makefile @@ -35,8 +35,8 @@ PYTHON = python3 # Don't change the following #--------------------------------------------------------------- -GCC = g++ -CFLAGS = -g -MMD -MP -Wall -O2 $(shell root-config --cflags) +GCC = /bin/g++ -std=c++11 +CFLAGS = -g -fPIC -MMD -MP -Wall -O2 $(shell root-config --cflags) LDFLAGS = $(shell root-config --libs) LIBS = lib/libclass.so @@ -67,8 +67,8 @@ default: class: $(PYTHON) $(CLASSDIR)/make_dict.py $(CLASSDIR)/include - rootcint -f $(CLASSDIR)/$(DICTNAME).cxx -c $(CLASSES) $(DICTDIR)/Linkdef.h - $(GCC) `root-config --cflags --libs` -shared $(CLASSDIR)/$(DICTNAME).cxx $(CLASSESCPP) -o $(CLASSLIB)/libclass.so + rootcling -f $(CLASSDIR)/$(DICTNAME).cxx -c $(CLASSES) $(DICTDIR)/Linkdef.h + $(GCC) -fPIC `root-config --cflags --libs` -shared $(CLASSDIR)/$(DICTNAME).cxx $(CLASSESCPP) -o $(CLASSLIB)/libclass.so rm $(CLASSDIR)/Dict.cxx mv $(CLASSDIR)/$(DICTNAME)_rdict.pcm $(CLASSLIB)/ # echo "Make completed" diff --git a/src/main.cpp b/src/main.cpp index eef5ab60a7b1789ae7145095112a90d9ab2b4e8f..148e9e9ba6fcae3ae43eb2b9561237de3a71480a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,7 +3,7 @@ #include "TSTreeObject.h" -#include "Print.h" +#include "print.h" #include "utils.h" #include "classdef.h" @@ -105,7 +105,6 @@ int main(int argc, char **argv) start = std::chrono::system_clock::now(); - TFile *file1 = new TFile("test1.root"); TTree *tree1 = (TTree*)file1->Get("tree"); TSTreeObject t1(tree1, "classA");