forked from cms-analysis/JetMETAnalysis-JetUtilities
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
89 lines (67 loc) · 2.68 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
################################################################################
#
# JetMETAnalysis/JetUtilities Makefile (for standalone use outside CMSSW/SCRAM)
# -----------------------------------------------------------------------------
#
# INSTRUCTIONS:
# =============
# setenv ROOTSYS /path/to/root
# setenv PATH $ROOTSYS/bin:${PATH}
# setenv LD_LIBRARY_PATH $ROOTSYS/lib
#
# mkdir standalone; cd standalone
# setenv STANDALONE_DIR $PWD
# setenv PATH $STANDALONE_DIR/bin:${PATH}
# setenv LD_LIBRARY_PATH $STANDALONE_DIR/lib:${LD_LIBRARY_PATH}
# cvs co -d JetUtilities CMSSW/CondFormats/JetUtilities
# cd JetUtilities
# make
#
# [you might want to stick these into e.g. $STANDALONE_DIR/setup.[c]sh]
#
# 07/29/2008 Philipp Schieferdecker <philipp.schieferdecker@cern.ch>
################################################################################
ifeq ($(STANDALONE_DIR),)
standalone_dir:=../
export STANDALONE_DIR:=$(standalone_dir)
endif
TMPDIR = $(STANDALONE_DIR)/tmp
LIBDIR = $(STANDALONE_DIR)/lib
BINDIR = $(STANDALONE_DIR)/bin
CXX = g++
ROOTCXXFLAGS = $(shell $(ROOTSYS)/bin/root-config --cflags)
CXXFLAGS = -O3 -Wall -fPIC -I. $(ROOTCXXFLAGS)
ROOTLIBS = $(shell $(ROOTSYS)/bin/root-config --libs)
OBJS = $(TMPDIR)/CommandLine.o $(TMPDIR)/RootStyle.o
LIB = libJetUtilities.so
LIBS = -L$(LIBDIR) -lJetUtilities
all: setup lib bin
setup:
rm -f JetMETAnalysis; ln -sf ../ JetMETAnalysis
mkdir -p $(TMPDIR)
mkdir -p $(LIBDIR)
mkdir -p $(BINDIR)
lib: $(OBJS)
$(CXX) $(CXXFLAGS) -shared $(OBJS) $(ROOTLIBS) -o $(LIBDIR)/$(LIB)
bin: jet_inspect_profiles jet_inspect_histos jet_inspect_graphs
jet_inspect_profiles:
$(CXX) $(CXXFLAGS) bin/jet_inspect_profiles_x.cc $(LIBS) $(ROOTLIBS) \
-o $(BINDIR)/jet_inspect_profiles_x
jet_inspect_histos:
$(CXX) $(CXXFLAGS) bin/jet_inspect_histos_x.cc $(LIBS) $(ROOTLIBS) \
-o $(BINDIR)/jet_inspect_histos_x
jet_inspect_graphs:
$(CXX) $(CXXFLAGS) bin/jet_inspect_graphs_x.cc $(LIBS) $(ROOTLIBS) \
-o $(BINDIR)/jet_inspect_graphs_x
clean:
rm -rf $(OBJS) $(LIBDIR)/$(LIB) JetMETAnalysis \
$(BINDIR)/jet_inspect_profiles_x \
$(BINDIR)/jet_inspect_histos_x \
$(BINDIR)/jet_inspect_graphs_x
################################################################################
# $(OBJS)
################################################################################
$(TMPDIR)/CommandLine.o: interface/CommandLine.h src/CommandLine.cc
$(CXX) $(CXXFLAGS) -c -o $(TMPDIR)/CommandLine.o src/CommandLine.cc
$(TMPDIR)/RootStyle.o: interface/RootStyle.h src/RootStyle.cc
$(CXX) $(CXXFLAGS) -c -o $(TMPDIR)/RootStyle.o src/RootStyle.cc