-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile_JZB
76 lines (54 loc) · 3.22 KB
/
Makefile_JZB
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
#
# Macro's Makefile
#
# First run 'make deps', then: 'make [-j n] [targets]'
#
#
ROOTCFLAGS = $(shell root-config --cflags)
ROOTLIBS = $(shell root-config --libs)
ROOTGLIBS = $(shell root-config --glibs)
INCLUDES = -I./include -I$(CMSSW_RELEASE_BASE)/src/
CXX = g++
CXXFLAGS = -g -fPIC -fno-var-tracking -Wno-deprecated -D_GNU_SOURCE -O2 -std=c++0x $(INCLUDES)
#CXXFLAGS = -g -Wno-deprecated -D_GNU_SOURCE -O2 -std=c++0x -ftree-vectorize $(INCLUDES)
#CXXFLAGS = -O2 -fno-var-tracking -pedantic -ansi -pthread -pipe -Wno-vla -Werror=overflow -Wstrict-overflow -std=c++0x -msse3 -ftree-vectorize -Wno-strict-overflow -Werror=array-bounds -Werror=format-contains-nul -Werror=type-limits -fvisibility-inlines-hidden -felide-constructors -fmessage-length=0 -ftemplate-depth-300 -Wall -Wno-non-template-friend -Wno-long-long -Wreturn-type -Wunused -Wparentheses -Wno-deprecated -Werror=return-type -Werror=missing-braces -Werror=unused-value -Werror=address -Werror=format -Werror=sign-compare -Werror=write-strings -fdiagnostics-show-option -g -D_GNU_SOURCE -fPIC $(INCLUDES)
LD = g++
LDFLAGS = -g
SOFLAGS = -O --no_exceptions -shared
CXXFLAGS += $(ROOTCFLAGS)
LIBS = $(ROOTLIBS)
# Juggle with patch versions...
CMSSW_BASE_VERSION = $(filter CMSSW%, $(subst _patch, , $(CMSSW_VERSION) ))
NGLIBS = $(ROOTGLIBS) -lMinuit -lMinuit2 -lTreePlayer
GLIBS = $(filter-out -lNew, $(NGLIBS))
GLIBS += -L$(CMSSW_RELEASE_BASE)/lib/$(SCRAM_ARCH) -L/swshare/cms/slc5_amd64_gcc462/cms/cmssw/$(CMSSW_BASE_VERSION)/lib/$(SCRAM_ARCH) -lFWCoreFWLite -lFWCoreUtilities -lDataFormatsCommon -lDataFormatsFWLite -lCondFormatsJetMETObjects
SRCS = src/base/TreeClassBase.cc src/base/TreeReader.cc src/base/TreeAnalyzerBase.cc src/base/UserAnalysisBase.cc \
src/helper/Davismt2.cc src/SolveTTbarNew.cc src/helper/Hemisphere.cc src/helper/BTagSF.cc src/helper/OnTheFlyCorrections.cc
#src/helper/PUWeight.C src/helper/Lumi3DReWeighting_standalone.cc\
OBJS = $(patsubst %.C,%.o,$(SRCS:.cc=.o))
.SUFFIXES: .cc,.C,.hh,.h
.PHONY : clean purge all depend
# Rules ====================================
all: RunJZBAnalyzer #RunQuickAnalyzer
RunUserAnalyzer: src/exe/RunUserAnalyzer.C src/UserAnalyzer.cc src/UserAnalysis.cc $(OBJS)
$(CXX) $(CXXFLAGS) -ldl $(GLIBS) $(LDFLAGS) -o $@ $^
mv RunUserAnalyzer /scratch/$$USER/RunUserAnalyzer
mv /scratch/$$USER/RunUserAnalyzer RunUserAnalyzer
RunJZBAnalyzer: src/exe/RunJZBAnalyzer.C src/JZBAnalyzer.cc src/JZBAnalysis.cc $(OBJS)
$(CXX) $(CXXFLAGS) -ldl $(GLIBS) $(LDFLAGS) -o $@ $^
mv RunJZBAnalyzer /scratch/$$USER/RunJZBAnalyzer
mv /scratch/$$USER/RunJZBAnalyzer RunJZBAnalyzer
#RunQuickAnalyzer: src/exe/RunQuickAnalyzer.C src/QuickAnalyzer.cc src/QuickAnalysis.cc $(OBJS)
# $(CXX) $(CXXFLAGS) -ldl $(GLIBS) $(LDFLAGS) -o $@ $^
# mv RunQuickAnalyzer /scratch/$$USER/RunQuickAnalyzer
# mv /scratch/$$USER/RunQuickAnalyzer RunQuickAnalyzer
clean:
find src -name '*.o' -exec $(RM) -v {} ';'
$(RM) RunUserAnalyzer
$(RM) RunJZBAnalyzer
$(RM) RunQuickAnalyzer
purge:
$(RM) $(OBJS)
deps: $(SRCS)
makedepend $(INCLUDES) $^
# DO NOT DELETE THIS LINE -- make depend needs it