-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.inc
40 lines (33 loc) · 1.19 KB
/
Makefile.inc
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
#common definitions go in here
SHELL = /bin/sh
CXX = g++
CXXFLAGS = -O -Wextra -fPIC -g -Wall
CXX11FLAGS = -std=c++11
CXX14FLAGS = -std=c++14
LD = g++
LDFLAGS = -O
LIBDIR = $(WORKDIR)
OS := $(shell uname -s)
ifeq ($(OS),Darwin)
SOFLAGS = -dynamiclib
else
SOFLAGS = -shared
endif
ifndef ROOTSYS
$(error *** Please set up Root)
endif
#find out about the installed ROOT
ROOTCONFIG := $(ROOTSYS)/bin/root-config
ROOTCFLAGS := $(shell $(ROOTCONFIG) --cflags)
ROOTLDFLAGS := $(shell $(ROOTCONFIG) --ldflags) $(shell $(ROOTCONFIG) --libs --nonew --glibs)
#append to options
CXXFLAGS += $(ROOTCFLAGS)
LDFLAGS += $(ROOTLDFLAGS)
LIBS = -lRooFitCore -lRooFit -lMinuit -lHtml -lMathMore -lPyROOT -lFoam -lRooStats -lTreePlayer -lTMVA
ifneq ($(CMSSW_BASE),)
ROOTFIT_INCLUDE := $(shell cd $(CMSSW_BASE); scram tool info roofitcore | grep INCLUDE= | sed 's|INCLUDE=||')
ROOTFIT_LIBDIR := $(shell cd $(CMSSW_BASE); scram tool info roofitcore | grep LIBDIR= | sed 's|LIBDIR=||')
CINTINCLUDES := -I$(ROOTFIT_INCLUDE)
CXXFLAGS += -I$(ROOTFIT_INCLUDE)
LDFLAGS += -L$(ROOTFIT_LIBDIR)
endif