-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
164 lines (126 loc) · 5.74 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# $Id: Makefile,v 1.3 2013/05/23 10:12:38 crovelli Exp $
ROOTLIBS = $(shell $(ROOTSYS)/bin/root-config --libs)
ROOTGLIBS = $(shell $(ROOTSYS)/bin/root-config --glibs)
BINFILES = $(wildcard *.cpp)
PROGRAMS = $(patsubst %.cpp,%,$(BINFILES))
# --- External configuration ---------------------------------
CC = g++ -Wall
CCFLAGS = -g
MFLAGS = -MM
INCLUDES =
WORKDIR = $(PWD)
LIBDIR = $(WORKDIR)
OBJDIR=$(WORKDIR)/objects/
# -------------------------------------------------------------
ROOFIT_INCLUDE := $(shell cd $(CMSSW_BASE); scram tool info roofitcore | grep INCLUDE= | sed 's|INCLUDE=||')
ROOFIT_LIBDIR := $(shell cd $(CMSSW_BASE); scram tool info roofitcore | grep LIBDIR= | sed 's|LIBDIR=||')
ROOFIT_LIBS := $(shell cd $(CMSSW_BASE); scram tool info roofitcore | grep LIB= | sed 's|LIB=||')
ROOFIT_LIBS += $(shell cd $(CMSSW_BASE); scram tool info roofit | grep LIB= | sed 's|LIB=||')
INCLUDES += -I. -I.. -I$(ROOTSYS)/include -I$(ROOFIT_INCLUDE)/ -I$(CMSSW_BASE)/src -I$(CMSSW_BASE)/src/CommonTools -I$(CMSSW_BASE)/src/
ROOTSYS ?= ERROR_RootSysIsNotDefined
EXTRALIBS := -L$(ROOTSYS)/lib -L$(ROOFIT_LIBDIR)/ -lHtml -lMathCore -lGenVector -lMinuit -lEG -lRooFitCore -lRooFit -lRIO -lTMVA
# CC files excluding the binaries
CCFILES=$(filter-out $(BINFILES),$(wildcard *.cc))
# List of all object files to build
OLIST = $(OBJDIR)/RedNtpFinalizer.o $(OBJDIR)/AnalysisJet.o $(OBJDIR)/BTagSFUtil.o $(OBJDIR)/SFlightFuncs.o $(OBJDIR)/MistagFuncs.o
OLIST += $(OBJDIR)/DrawBase.o $(OBJDIR)/fitTools.o
OLIST += $(OBJDIR)/TAbsFitParticle.o $(OBJDIR)/TAbsFitConstraint.o $(OBJDIR)/TFitConstraintM.o $(OBJDIR)/TFitParticleEtEtaPhi.o $(OBJDIR)/TKinFitter.o $(OBJDIR)/DiJetKinFitter.o
OLIST += $(OBJDIR)/HelicityLikelihoodDiscriminant.o $(OBJDIR)/RooPentaSpinTwo.o $(OBJDIR)/RooBphione.o $(OBJDIR)/RooBtheta.o $(OBJDIR)/RooBkg2l2jHL.o $(OBJDIR)/RooSpinZero5DV2.o $(OBJDIR)/RooBkgd2L2JV2.o
OLIST +=$(patsubst %.cc,$(OBJDIR)/%.o,$(notdir $(CCFILES)))
$(OBJDIR)/RedNtpFinalizer.o: $(CMSSW_BASE)/src/CommonTools/RedNtpFinalizer.cc
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/AnalysisJet.o: $(CMSSW_BASE)/src/CommonTools/AnalysisJet.cc
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/BTagSFUtil.o: $(CMSSW_BASE)/src/BTagSFUtil/src/BTagSFUtil.cc
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/SFlightFuncs.o: $(CMSSW_BASE)/src/BTagSFUtil/src/SFlightFuncs.cc
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/MistagFuncs.o: $(CMSSW_BASE)/src/BTagSFUtil/src/MistagFuncs.cc
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/DrawBase.o: $(CMSSW_BASE)/src/CommonTools/DrawBase.C
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/fitTools.o: $(CMSSW_BASE)/src/CommonTools/fitTools.C
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/DiJetKinFitter.o: $(CMSSW_BASE)/src/KinematicFit/DiJetKinFitter.cc
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/TAbsFitParticle.o: $(CMSSW_BASE)/src/KinematicFit/TAbsFitParticle.cc
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/TAbsFitConstraint.o: $(CMSSW_BASE)/src/KinematicFit/TAbsFitConstraint.cc
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/TFitConstraintM.o: $(CMSSW_BASE)/src/KinematicFit/TFitConstraintM.cc
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/TFitParticleEtEtaPhi.o: $(CMSSW_BASE)/src/KinematicFit/TFitParticleEtEtaPhi.cc
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/TKinFitter.o: $(CMSSW_BASE)/src/KinematicFit/TKinFitter.cc
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/HelicityLikelihoodDiscriminant.o: $(CMSSW_BASE)/src/HelicityLikelihoodDiscriminant/HelicityLikelihoodDiscriminant.cc
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/RooPentaSpinTwo.o: $(CMSSW_BASE)/src/HelicityLikelihoodDiscriminant/PDFs/RooPentaSpinTwo.cc
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/RooBphione.o: $(CMSSW_BASE)/src/HelicityLikelihoodDiscriminant/PDFs/RooBphione.cc
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/RooBtheta.o: $(CMSSW_BASE)/src/HelicityLikelihoodDiscriminant/PDFs/RooBtheta.cc
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/RooBkg2l2jHL.o: $(CMSSW_BASE)/src/HelicityLikelihoodDiscriminant/PDFs/RooBkg2l2jHL.cc
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/RooSpinZero5DV2.o: $(CMSSW_BASE)/src/HelicityLikelihoodDiscriminant/PDFs/RooSpinZero5DV2.cc
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(OBJDIR)/RooBkgd2L2JV2.o: $(CMSSW_BASE)/src/HelicityLikelihoodDiscriminant/PDFs/RooBkgd2L2JV2.cc
@echo "Compiling $<"
mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
# Implicit rule to compile all classes
$(OBJDIR)/%.o : %.cc
@echo "Compiling $<"
@mkdir -p $(OBJDIR)
@$(CC) $(CCFLAGS) -c $< -o $@ $(INCLUDES)
$(PROGRAMS) : $(OLIST) $(BINFILES)
@echo "Linking $@"
@$(CC) $(CCFLAGS) $(INCLUDES) $(OLIST) \
$(ROOTLIBS) $(EXTRALIBS) -o $(WORKDIR)/$@ $(patsubst %,%.cpp,$@)
default : analysis
all : ${PROGRAMS}
clean:
rm -Rf $(OBJDIR)/*.o
rm drawRadion
rm finalize2012_radion
rm finalize2012_radion_commonNtp
#.PHONY : shlib lib default clean