-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
114 lines (72 loc) · 2.64 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
################################################################################
#
# Makefile to compile and link C programs
#
# Version valid for Linux machines
#
# "make" compiles and links the specified main programs and modules
# using the specified libraries (if any), and produces the executables
#
# "make clean" removes all files created by "make"
#
# Dependencies on included files are automatically taken care of
#
################################################################################
all: rmxeq mkdep mkxeq
.PHONY: all
GCC = g++
# main programs and required modules
#MAIN = 4jet-reco-signal #4jet-reco-signal-test #4jet-reco-back 4jet-reco-signal-gamma 4jet-reco-back-gamma
MAIN = HH_VBF #4jet-reco-signal-test #4jet-reco-back 4jet-reco-signal-gamma 4jet-reco-back-gamma
MODULES = Functions #
# search path for modules
MDIR = ./
#LHAPDF
#LHAPDFINCS = -I$(shell lhapdf-config --prefix)/include
#LHAPDFDIR = $(shell lhapdf-config --prefix)/lib
#LHAPDFLIBS = -L$(LHAPDFDIR) -lLHAPDF
# fastjet
FJINCS = $(shell /home/xanda/Documents/fastjet-install/bin/fastjet-config --cxxflags)
FJCLIBS = $(shell /home/xanda/Documents/fastjet-install/bin/fastjet-config --libs)
# root
ROOTINCS = $(shell /home/xanda/root/bin/root-config --cflags)
ROOTLIBS = $(shell /home/xanda/root/bin/root-config --glibs)
# scheduling and optimization options (such as -DSSE -DSSE2 -DP4)
CFLAGS = -ansi -O3 -Wall
# additional include directories
INCPATH = -I../include $(FJINCS) $(ROOTINCS)
# additional libraries to be included
LIBS = $(FJCLIBS) $(ROOTLIBS)
############################## do not change ###################################
SHELL=/bin/bash
CC=$(GCC)
PGMS= $(MAIN) $(MODULES)
INCDIRS = $(INCPATH)
OBJECTS = $(addsuffix .o,$(MODULES))
LDFLAGS = $(LIBS)
-include $(addsuffix .d,$(PGMS))
# rule to make dependencies
$(addsuffix .d,$(PGMS)): %.d: %.cc Makefile
@ $(CC) -MM -ansi $(INCDIRS) $< -o $@
# rule to compile source programs
$(addsuffix .o,$(PGMS)): %.o: %.cc Makefile
$(CC) $< -c $(CFLAGS) $(INCDIRS) -o $@
# rule to link object files
$(MAIN): %: %.o $(OBJECTS) Makefile
$(CC) $< $(OBJECTS) $(CFLAGS) $(LDFLAGS) -o $@
# produce executables
mkxeq: $(MAIN)
# remove old executables and old error log file
rmxeq:
@ -rm -f $(MAIN); \
echo "delete old executables"
# make dependencies
mkdep: $(addsuffix .d,$(PGMS))
@ echo "generate tables of dependencies"
# clean directory
clean:
@ -rm -rf *.d *.o *~ $(MAIN) *.eps *.data plots/*~ plots/*.eps *.a analysis/*~ analysis/*.eps
.PHONY: clean
#lib:
# ar rcs libResPairTagger.a ResPairTagger.o
################################################################################