-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
66 lines (52 loc) · 1.29 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
#makefile
CXXFLAGS = -g -I. -m64 $(shell root-config --cflags) -I include
LDFLAGS = $(shell root-config --libs) -lm -lGenVector
CXX = g++
EXTLIBS = ./ext/cConstants_cc.so ./ext/FinalStates_cc.so ./ext/bitops_cc.so ./ext/Discriminants_cc.so
VPATH = ./src/ ./include/
SRCPP_OS = run_OS.cpp\
OSmethod.cpp\
Tree.cpp\
Settings.cpp\
Category.cpp\
FakeRates.cpp\
Plots.cpp\
CMS_lumi.cpp
SRCPP_SS = run_SS.cpp\
SSmethod.cpp\
Tree.cpp\
Settings.cpp\
Category.cpp\
FakeRates.cpp\
Plots.cpp\
CMS_lumi.cpp
INCLUDES = OSmethod.h\
SSmethod.h\
Tree.h\
Settings.h\
Category.h\
FakeRates.h\
Plots.h\
CMS_lumi.h\
OBJCPP_OS = $(patsubst %.cpp,obj/%.o,$(SRCPP_OS))
OBJCPP_SS = $(patsubst %.cpp,obj/%.o,$(SRCPP_SS))
all : run_OS run_SS
obj/%.o: %.cpp $(INCLUDES)
@echo ">> compiling $*"
@mkdir -p obj/
@$(CXX) -c $< ${CXXFLAGS} -o $@
run_OS : $(OBJCPP_OS)
@echo ">> linking..."
@$(CXX) $^ $(EXTLIBS) ${LDFLAGS} ${CXXFLAGS} -o $@
run_SS : $(OBJCPP_SS)
@echo ">> linking..."
@$(CXX) $^ $(EXTLIBS) ${LDFLAGS} ${CXXFLAGS} -o $@
clean:
@echo ">> cleaning objects and executable"
@rm -f obj/*.o
@rm -f run
uninstall:
@echo ">> Uninstalling plotter"
@rm -f obj/*.o
@rm -f ext/*.so ext/*.d ext/*.pcm
@rm -f run