-
Notifications
You must be signed in to change notification settings - Fork 0
/
MakeFile
45 lines (32 loc) · 1.43 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
CFLAGS :=`root-config --cflags --libs`
SYSLIB := -lz -l TreePlayer -lMathMore
ROOTCLINGORCINT := rootcling
SrcSuf := cpp
ObjSuf := o
DepSuf := h
PcmSuf := _rdict.pcm
OBJS := HiRAReader.$(ObjSuf) EnergyLossModule.$(ObjSuf) nuclear_masses.$(ObjSuf) HiRACsICalibration.$(ObjSuf)
DEPS := $(_OBJS:.$(ObjSuf)=.$(DepSuf))
RBHIRATELESCOPE_HDRS := RBHiRATelescope.h RBHiRATelescopeLinkDef.h
INCLUDES := -I./include
INCLUDES += -I./Nuclear_Masses
PROG := $(wildcard exec_*.$(SrcSuf))
PROG := $(patsubst %.$(SrcSuf), %, $(PROG))
CXXFLAGS += $(INCLUDES) -std=c++11 -fPIC -O3
RBHIRATELESCOPE_DICT := RBHiRATelescopeDict.$(SrcSuf)
RBHIRATELESCOPE_DICTH := $(RBHIRATELESCOPE_DICT:.$(SrcSuf)=.h)
RBHIRATELESCOPE_DICTO := $(RBHIRATELESCOPE_DICT:.$(SrcSuf)=.$(ObjSuf))
RBHIRATELESCOPE_PCM := RBHiRATelescopeDict$(PcmSuf)
all: $(PROG)
.SUFFIXES: .$(SrcSuf) .$(ObjSuf) .$(PcmSuf)
$(PROG): $(OBJS) $(RBHIRATELESCOPE_DICTO)
$(CXX) $(CXXFLAGS) -o ${@} ${@}.cpp $^ $(SYSLIB) $(CFLAGS) $(RLIBS)
%.o: %.cpp $(DEPS)
$(CXX) $(CXXFLAGS) -c -o $@ $< $(CFLAGS)
$(RBHIRATELESCOPE_DICT):
@echo "Generating dictionary $@..."
$(ROOTCLINGORCINT) -f $@ -p $(INCLUDES) $(RBHIRATELESCOPE_HDRS)
.PHONY: clean
clean:
@$(RM) -f $(OBJS) $(RBHIRATELESCOPE_DICT) $(RBHIRATELESCOPE_PCM) $(RBHIRATELESCOPE_DICTO) $(RBHIRATELESCOPE_DICTH)
@echo "$(RM) -f $(OBJS) $(RBHIRATELESCOPE_DICT) $(RBHIRATELESCOPE_PCM) $(RBHIRATELESCOPE_DICTO) $(RBHIRATELESCOPE_DICTH)"