forked from bdorney/CMS_GEM_Analysis_Framework
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile.clang
92 lines (75 loc) · 2.76 KB
/
Makefile.clang
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
# Define the compiler
#CC = g++
CC = clang++ #For Mac OSX > 10.9 ???
# Define root-config
ROOTCONFIG = $(ROOTSYS)/bin/root-config
# Define any compile-time flags
CFLAGS = -g3 -O0 `$(ROOTCONFIG) --cflags --glibs --libs` -std=c++11
# Define any directories containing header files other than "/usr/include"
INCLUDES = -I include/ -I$(ROOTSYS)/include/
# Define any library paths in addition to "/usr/lib"
LPATHS = -L $(ROOTSYS)/lib/
# Define any libraries to link into executable
LIBS = -lSpectrum
# Define source files
SOURCES = src/DetectorMPGD.cpp \
src/FrameworkBase.cpp \
src/ReadoutSector.cpp \
src/ReadoutSectorPhi.cpp \
src/ReadoutSectorEta.cpp \
src/Interface.cpp \
src/InterfaceAnalysis.cpp \
src/ParameterLoader.cpp \
src/ParameterLoaderDetector.cpp \
src/ParameterLoaderFit.cpp \
src/ParameterLoaderAnalysis.cpp \
src/ParameterLoaderRun.cpp \
src/PlotterUtilityFunctions.cpp \
src/Selector.cpp \
src/SelectorCluster.cpp \
src/SelectorHit.cpp \
src/SRSAPVEvent.cpp \
src/SRSCluster.cpp \
src/SRSConfiguration.cpp \
src/SRSEventBuilder.cpp \
src/SRSFECDecoder.cpp \
src/SRSHit.cpp \
src/SRSMain.cpp \
src/SRSMapping.cpp \
src/SRSOutputROOT.cpp \
src/AnalyzeResponseUniformity.cpp \
src/AnalyzeResponseUniformityClusters.cpp \
src/AnalyzeResponseUniformityHits.cpp \
src/UniformityUtilityFunctions.cpp \
src/TimingUtilityFunctions.cpp \
src/Visualizer.cpp \
src/VisualizeUniformity.cpp \
src/VisualizeComparison.cpp \
src/frameworkMain.cpp
# Define object files
# We use Suffix Replacement
# $(name:string1=string2)
# for each owrd in 'name' we will replace 'string1' with 'string2'
# Here we replace all ".cpp" with ".o" when defining the objects
OBJECTS = $(SOURCES:.cpp=.o)
# Define the executable
EXEC = frameworkMain
# Define default behavior
#default: $(EXEC)
.PHONY: depend clean
all: $(EXEC)
@echo Compiling $(EXEC)
@echo ROOTSYS = $(ROOTSYS)
$(EXEC): $(OBJECTS)
$(CC) $(CFLAGS) $(INCLUDES) -o $(EXEC) $(OBJECTS) $(LPATHS) $(LIBS)
# Here we use Suffix Replacement to building our object files
# we use automatic variables $<: the name of the prerequisite of
# the rule (*.cpp file) and $@: the name of the target (*.o file)
# (you should review the gnu make manual, sec. on auto. variables)
.cpp.o:
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ $(LPATHS) $(LIBS)
clean:
$(RM) src/*.o src/*~ $(EXEC)
depend: $(SOURCES)
makedepend $(INCLUDES) $^
# DO NOT DELETE THIS LINE -- make depend needs it