1
0
Fork 0
mirror of https://github.com/gwm17/Mask.git synced 2024-11-26 12:08:52 -05:00
Mask/makefile

44 lines
892 B
Makefile
Raw Normal View History

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
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:
$(RM) $(CLEANUP) $(BINDIR)/%.pcm