forked from hengne/FitZeeECALELF
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
83 lines (57 loc) · 2.13 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
# Author Hengne Li @ UVa CERN 2014
CC = g++
INCDIR = ./interface
EXEDIR = ./bin
SRCDIR = ./src
ROOTLIBS = -L$(ROOTSYS)/lib \
-lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d \
-lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics \
-lMathCore -lThread -lMinuit -lMinuit2 -lpthread -lTreePlayer \
-Wl,-rpath,$(ROOTSYS)/lib -stdlib=libc++ -lm -ldl
ROOTCFLAGS = -m64 -I$(ROOTSYS)/include
CFLAGS = $(ROOTCFLAGS) -I$(INCDIR)
LIBS = $(ROOTLIBS)
DEPS = $(wildcard $(INCDIR)/*.hpp)
SRCS = $(wildcard $(SRCDIR)/*.cpp)
OBJS = $(patsubst $(SRCDIR)/%.cpp,$(SRCDIR)/%.o,$(SRCS))
vpath %.hpp $(INCDIR)
vpath %.cpp $(SRCDIR)
vpath %.o $(SRCDIR)
vpath %.exe $(EXEDIR)
# this group of exes use config.o
_EXES1 = fitzeescale.exe fitzee.exe \
drawMee.exe
# this group of exes do not use config.o
_EXES2 = copyTree.exe \
draw_calibTable.exe \
calculateEtaScaleFromICs.exe \
printic.exe \
printetascale.exe
EXES1 = $(patsubst %.exe,$(EXEDIR)/%.exe,$(_EXES1))
EXES2 = $(patsubst %.exe,$(EXEDIR)/%.exe,$(_EXES2))
all: $(EXES1) $(EXES2)
# dep: nothing
_OBJS3 = calculateEtaScaleFromICs.o \
printetascale.o \
draw_calibTable.o \
printic.o
OBJS3 = $(patsubst %,$(SRCDIR)/%,$(_OBJS3))
$(SRCDIR)/fitzee.o $(SRCDIR)/fitzeescale.o: $(SRCDIR)/%.o: $(SRCDIR)/%.cpp \
functions.hpp variables.hpp config.hpp calibRecord.hpp voigt.hpp
$(CC) -o $@ -c $< $(CFLAGS)
$(SRCDIR)/config.o: $(SRCDIR)/%.o: $(SRCDIR)/%.cpp $(INCDIR)/%.hpp
$(CC) -o $@ -c $< $(CFLAGS)
$(SRCDIR)/copyTree.o: $(SRCDIR)/%.o: $(SRCDIR)/%.cpp $(INCDIR)/%.hpp calibTreeDef.hpp
$(CC) -o $@ -c $< $(CFLAGS)
$(OBJS3): $(SRCDIR)/%.o: $(SRCDIR)/%.cpp
$(CC) -o $@ -c $< $(CFLAGS)
$(SRCDIR)/drawMee.o: $(SRCDIR)/%.o: $(SRCDIR)/%.cpp $(INCDIR)/%.hpp config.hpp calibRecord.hpp etaring.hpp calibTreeDef.hpp
$(CC) -o $@ -c $< $(CFLAGS)
$(EXES1): $(EXEDIR)/%.exe: $(SRCDIR)/%.o $(SRCDIR)/config.o | $(EXEDIR)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
$(EXES2): $(EXEDIR)/%.exe: $(SRCDIR)/%.o | $(EXEDIR)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
$(EXEDIR):
mkdir $(EXEDIR)
clean:
\rm -f $(EXEDIR)/*.exe $(SRCDIR)/*.o