2020-11-16 13:38:39 -05:00
|
|
|
CC=g++
|
|
|
|
ROOTGEN=rootcint
|
|
|
|
CFLAGS=-std=c++11 -g -Wall `root-config --cflags`
|
|
|
|
CPPFLAGS=-I ./include
|
|
|
|
LDFLAGS=`root-config --glibs`
|
|
|
|
|
|
|
|
ROOTINCLDIR=./
|
|
|
|
INCLDIR=./include
|
|
|
|
SRCDIR=./src
|
|
|
|
OBJDIR=./objs
|
|
|
|
BINDIR=./bin
|
|
|
|
|
|
|
|
SRC=$(wildcard $(SRCDIR)/*.cpp)
|
|
|
|
OBJS=$(SRC:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o)
|
|
|
|
|
|
|
|
DICTOBJ=$(OBJDIR)/kinematics_dict.o
|
|
|
|
DICTSRC=$(SRCDIR)/kinematics_dict.cxx
|
|
|
|
DICT_PAGES=$(INCLDIR)/Kinematics.h $(INCLDIR)/LinkDef_Kinematics.h
|
|
|
|
|
|
|
|
EXE=$(BINDIR)/kinematics
|
|
|
|
|
2020-12-09 17:07:58 -05:00
|
|
|
CLEANUP=$(EXE) $(OBJS) $(DICTOBJ) $(DICTSRC)
|
2020-11-16 13:38:39 -05:00
|
|
|
|
|
|
|
.PHONY: all clean
|
|
|
|
|
|
|
|
all: $(EXE) $(TPEXE)
|
|
|
|
|
|
|
|
$(EXE): $(DICTOBJ) $(OBJS)
|
|
|
|
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
|
|
|
|
|
|
|
|
$(DICTOBJ): $(DICTSRC)
|
|
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) -I $(ROOTINCLDIR) -c $^ -o $@
|
|
|
|
mv $(SRCDIR)/*.pcm $(BINDIR)
|
|
|
|
|
|
|
|
$(DICTSRC): $(DICT_PAGES)
|
|
|
|
$(ROOTGEN) -f $@ $^
|
|
|
|
|
|
|
|
VPATH= $(SRCDIR):./testplots/
|
|
|
|
$(OBJDIR)/%.o: %.cpp
|
|
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) -c $^ -o $@
|
|
|
|
|
|
|
|
clean:
|
2020-12-09 17:07:58 -05:00
|
|
|
$(RM) $(CLEANUP) $(BINDIR)/%.pcm
|