-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
122 lines (85 loc) · 2.88 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
115
116
117
118
119
120
121
122
#
# Example Makefile for ROOTANA-based projects
#
CXXFLAGS = -g -O2 -Wall -Wuninitialized
# required ZLIB library
CXXFLAGS += -DHAVE_LIBZ -std=c++11
# required ROOTANA library
ifndef ROOTANASYS
ROOTANASYS=..
endif
CXXFLAGS += -I$(ROOTANASYS)/include
LIBS += -L$(ROOTANASYS)/lib -lrootana
# ROOT libraries
ifdef ROOTSYS
ROOTCFLAGS := $(shell root-config --cflags)
ROOTFEATURES := $(shell root-config --features)
ROOTGLIBS := $(shell root-config --glibs) -lThread
HAVE_ROOT_HTTP := $(findstring http,$(ROOTFEATURES))
HAVE_ROOT_XML := $(findstring xml,$(ROOTFEATURES))
CXXFLAGS += -DHAVE_ROOT $(ROOTCFLAGS)
ifdef HAVE_ROOT_XML
CXXFLAGS += -DHAVE_ROOT_XML
ROOTGLIBS += -lXMLParser -lThread -lRHTTP
endif
ifdef HAVE_ROOT_HTTP
CXXFLAGS += -DHAVE_ROOT_HTTP -DHAVE_THTTP_SERVER
ROOTGLIBS += -lRHTTP
endif
endif # ROOTSYS
# optional MIDAS library
ifdef MIDASSYS
MIDASLIBS = $(MIDASSYS)/linux/lib/libmidas.a -lutil -lrt
CXXFLAGS += -DHAVE_MIDAS -DOS_LINUX -Dextname -I$(MIDASSYS)/include
UNAME := $(shell uname)
ifeq ($(UNAME),Darwin)
MIDASLIBS = $(MIDASSYS)/darwin/lib/libmidas.a
endif
LIBS += $(MIDASLIBS)
endif # MIDASSYS
CAENDIGLIB = $(HOME)/Andrew/CAENStuff/CAENDigitizer_2.7.9/include
CAENCOMMLIB = $(HOME)/Andrew/CAENStuff/CAENComm-1.2/include
OBJS:=
OBJS += TV792Histogram.o
OBJS += TV1720Waveform.o
OBJS += TUCNHit.o
OBJS += TUCNDetectorBaseClass.o
OBJS += TUCNDetectorCharge.o
OBJS += TUCNRateVsTime.o
OBJS += THe3Detector.o
OBJS += TLi6Detector.o
OBJS += THe3CountsInSequence.o
OBJS += TAnaManager.o
OBJS += TV1720Histograms.o
OBJS += PulseShapeStruct.o
OBJS += TUCNAnaViewer3.o
OBJS += TV1720WaveformDisplay.o
OBJS += TUCNTreeMaker.o
OBJS += TLi6GainCalib.o
all: $(OBJS) ana.exe anaDisplay.exe midas2root.exe analyzer_persist.exe
# UCNAnalyzer.exe UCNDisplay.exe UCNRateMonitor.exe UCNDisplay3.exe
ana.exe: ana.cxx $(OBJS)
$(CXX) -o $@ $(CXXFLAGS) $^ $(LIBS) $(ROOTGLIBS) -lm -lz -lpthread -lssl -lutil
anaDisplay.exe: anaDisplay.cxx $(OBJS)
$(CXX) -o $@ $(CXXFLAGS) $^ $(LIBS) $(ROOTGLIBS) -lm -lz -lpthread -lssl -lutil
midas2root.exe: midas2root.cxx $(OBJS)
$(CXX) -o $@ $(CXXFLAGS) $^ $(LIBS) $(ROOTGLIBS) -lm -lz -lpthread -lssl -lutil
analyzer_persist.exe: analyzer_persist.cxx $(OBJS)
$(CXX) -o $@ $(CXXFLAGS) $^ $(LIBS) $(ROOTGLIBS) -lm -lz -lpthread -lssl -lutil
#UCNDisplay.exe: UCNDisplay.cxx $(OBJS)
# $(CXX) -o $@ $(CXXFLAGS) $^ $(LIBS) $(ROOTGLIBS) -lm -lz -lpthread -lssl -lutil
#UCNDisplay3.exe: UCNDisplay3.cxx $(OBJS)
# $(CXX) -o $@ $(CXXFLAGS) $^ $(LIBS) $(ROOTGLIBS) -lm -lz -lpthread -lssl -lutil
#UCNRateMonitor.exe: UCNRateMonitor.cxx $(OBJS)
# $(CXX) -o $@ $(CXXFLAGS) $^ $(LIBS) $(ROOTGLIBS) -lm -lz -lpthread -lssl -lutil
#UCNAnalyzer.exe: UCNAnalyzer.cxx $(OBJS)
# $(CXX) -o $@ $(CXXFLAGS) $^ $(LIBS) $(ROOTGLIBS) -lm -lz -lpthread -lssl -lutil
%.o: %.cxx
$(CXX) -o $@ $(CXXFLAGS) -c $<
dox:
doxygen
clean::
-rm -f *.o *.a
-rm -f *.exe
-rm -rf *.exe.dSYM
# end