66 lines
1.7 KiB
Makefile
66 lines
1.7 KiB
Makefile
#---------------------------------------------------
|
|
# get compilation flags from root-config
|
|
|
|
ROOTCFLAGS = $(shell $(ROOTSYS)/bin/root-config --cflags)
|
|
|
|
#---------------------------------------------------
|
|
|
|
|
|
CXX = g++
|
|
CXXFLAGS = -g -Wall -Wno-trigraphs -fPIC
|
|
MUSRFITINCLUDE = ../../../include
|
|
#MUSRFITINCLUDE = /home/l_wojek/rep/analysis/musrfit/src/include
|
|
LOCALINCLUDE = ../include
|
|
ROOTINCLUDE = $(ROOTSYS)/include
|
|
INCLUDES = -I$(LOCALINCLUDE) -I$(MUSRFITINCLUDE) -I$(ROOTINCLUDE)
|
|
LD = g++
|
|
LDFLAGS = -g
|
|
SOFLAGS = -O -shared
|
|
|
|
# the output from the root-config script:
|
|
CXXFLAGS += $(ROOTCFLAGS)
|
|
LDFLAGS +=
|
|
|
|
# some definitions: headers (used to generate *Dict* stuff), sources, objects,...
|
|
OBJS =
|
|
OBJS += TTrimSPDataHandler.o
|
|
OBJS += TBofZCalc.o
|
|
OBJS += TPofBCalc.o
|
|
OBJS += TPofTCalc.o
|
|
OBJS += TFitPofBStartupHandler.o TFitPofBStartupHandlerDict.o
|
|
OBJS += TLondon1D.o TLondon1DDict.o
|
|
|
|
SHLIB = libTFitPofB.so
|
|
|
|
# make the shared lib:
|
|
#
|
|
all: $(SHLIB)
|
|
|
|
$(SHLIB): $(OBJS)
|
|
@echo "---> Building shared library $(SHLIB) ..."
|
|
/bin/rm -f $(SHLIB)
|
|
$(LD) $(OBJS) $(SOFLAGS) -o $(SHLIB)
|
|
@echo "done"
|
|
|
|
# clean up: remove all object file (and core files)
|
|
# semicolon needed to tell make there is no source
|
|
# for this target!
|
|
#
|
|
clean:; @rm -f $(OBJS) *Dict* core*
|
|
@echo "---> removing $(OBJS)"
|
|
|
|
#
|
|
$(OBJS): %.o: %.cpp
|
|
$(CXX) $(INCLUDES) $(CXXFLAGS) -c $<
|
|
|
|
# Generate the ROOT CINT dictionary
|
|
|
|
TLondon1DDict.cpp: ../include/TLondon1D.h ../include/TLondon1DLinkDef.h
|
|
@echo "Generating dictionary $@..."
|
|
rootcint -f $@ -c -p -I$(MUSRFITINCLUDE) $^
|
|
|
|
TFitPofBStartupHandlerDict.cpp: ../include/TFitPofBStartupHandler.h ../include/TFitPofBStartupHandlerLinkDef.h
|
|
@echo "Generating dictionary $@..."
|
|
rootcint -f $@ -c -p $^
|
|
|