-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
69 lines (49 loc) · 2.12 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
## makefile for the fake rate framework
ROOTCFLAGS = $(shell root-config --cflags)
ROOTLIBS = $(shell root-config --libs) -lRooFitCore -lRooFit
ROOTGLIBS = $(shell root-config --glibs)
#ROOTINCDIR = $(shell root-config --incdir)
LIBS = $(ROOTLIBS)
INCLUDES = -I. $(ROOTCFLAGS)
# this is a roofit version somewhere: -I/swshare/cms/slc5_amd64_gcc462/lcg/roofit/5.32.03-cms16/include/
CXX = g++ -g -fPIC -fno-var-tracking -Wno-deprecated -D_GNU_SOURCE -O2
CXXFLAGS = $(INCLUDES)
SRCSA = src/FWBaseClass.C src/Fakerates.cc
OBJSA = $(patsubst %.C,%.o,$(SRCSA:.cc=.o))
includes = $(wildcard include/*.h)
## SRCSB = src/FWBaseClass.C src/Estimation.cc
## OBJSB = $(patsubst %.C,%.o,$(SRCSB:.cc=.o))
##
SRCSC = src/FWBaseClass.C src/Fakerates.cc src/FakeRatios.cc src/BTagSF.cc src/Closure.cc
OBJSC = $(patsubst %.C,%.o,$(SRCSC:.cc=.o))
SRCSD = src/FWBaseClass.C src/dps.cc
OBJSD = $(patsubst %.C,%.o,$(SRCSD:.cc=.o))
.SUFFIXES: .cc,.C,.hh,.h
.PHONY : clean purge all depend
# Rules ====================================
all: Fakerates dps Closure depend
Fakerates: exe/Fakerates.C $(OBJSA)
$(CXX) $(INCLUDES) $(LIBS) -ldl -o $@ $^
## Estimation: exe/Estimation.C $(OBJSB)
## $(CXX) $(INCLUDES) $(LIBS) -ldl -o $@ $^
##
Closure: exe/Closure.C $(OBJSC)
$(CXX) $(INCLUDES) $(LIBS) -ldl -o $@ $^
dps: exe/dps.C $(OBJSD)
$(CXX) $(INCLUDES) $(LIBS) -ldl -o $@ $^
## old .depend: $(SRCSA) $(SRCSB) $(SRCSC)
## old rm -f ./.depend
## old $(foreach SRC,$(SRCA),$(SRCB),$(SRCC),$(CXX) -I. -I$(shell root-config --incdir) -MG -MM -MT $(patsubst %.C,%.o,$(SRC:.cc=.o)) $(SRC) >> ./.depend;)
depend:
rm -f ./.depend
$(foreach SRC,$(SRCSA) $(SRCSC) $(SRCSD),$(CXX) -I. -I$(shell root-config --incdir) -MG -MM -MT $(patsubst %.C,%.o,$(SRC:.cc=.o)) $(SRC) >> ./.depend;)
### $(foreach SRC,$(SRCSA) $(SRCSB) $(SRCSC) $(SRCSD),$(CXX) -I. -I$(shell root-config --incdir) -MG -MM -MT $(patsubst %.C,%.o,$(SRC:.cc=.o)) $(SRC) >> ./.depend;)
clean:
find src -name '*.o' -exec $(RM) -v {} ';'
$(RM) .depend
$(RM) Fakerates
$(RM) Closure
$(RM) dps
## $(RM) Estimation
## $(RM) Closure
-include .depend