-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.fakerate
60 lines (47 loc) · 1.34 KB
/
Makefile.fakerate
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
UNAME = $(shell uname)
EXE = fr
VPATH = .:./interface
vpath %.h ./interface
CSUF = cc
HSUF = h
DICTC = Dict.$(CSUF)
DICTH = $(patsubst %.$(CSUF),%.h,$(DICTC))
#SRCS = $(wildcard src/*.$(CSUF))
SRCS = src/PhysicsObjects.cc src/AnaBase.cc src/FakeRate.cc src/fakerate.cc
OBJS = $(patsubst %.$(CSUF), %.o, $(SRCS))
LDFLAGS = -g
SOFLAGS = -shared
CXXFLAGS = -I./interface -I./
CXX = g++
CXXFLAGS += -Wall -Wno-deprecated
LIBS =
HDRS = $(wildcard interface/*.$(HSUF))
HDRS_DICT = interface/PhysicsObjects.h interface/LinkDef.h
bin: $(EXE)
all:
gmake cint
gmake bin
cint: $(DICTC)
$(DICTC): $(HDRS_DICT)
@echo "Generating dictionary $(DICTC) and $(DICTH) ..."
rootcint -f $@ -c $(CXXFLAGS) $^
perl -pi -e 's#interface/##' $(DICTH)
@mv $(DICTC) src/
@mv $(DICTH) interface/
$(EXE): $(OBJS) src/Dict.o
$(CXX) $(LDFLAGS) $^ -o $@ $(LIBS) `root-config --libs` -lTMVA
# Create object files
%.o : %.$(CSUF)
$(CXX) $(CXXFLAGS) `root-config --cflags` -o $@ -c $<
# makedepend
depend: $(SRCS:.$(CSUF)=.$(CSUF).dep)
@cat $(notdir $^) > Makefile.dep
@-rm -f $(notdir $^) $(patsubst %,%.bak,$(notdir $^))
%.dep:
@touch $(notdir $@)
rmkdepend -f$(notdir $@) -- $(CXXFLAGS) `root-config --cflags` -- $*
include Makefile.dep
# Clean
.PHONY : clean
clean :
@-rm $(OBJS) $(EXE) interface/$(DICTH) src/$(DICTC) src/Dict.o