-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·43 lines (33 loc) · 1.13 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
ROOTCFLAGS = $(shell root-config --cflags)
ROOTGLIBS = $(shell root-config --glibs)
CXX = g++
CXXFLAGS = -fPIC -Wall -O3 -g
CXXFLAGS += $(filter-out -stdlib=libc++ -pthread , $(ROOTCFLAGS))
GLIBS = $(filter-out -stdlib=libc++ -pthread , $(ROOTGLIBS))
INCLUDEDIR = ./include/
SRCDIR = ./src/
CXX += -I$(INCLUDEDIR) -I.
OUTOBJ = ./obj/
CC_FILES := $(wildcard src/*.cc)
HH_FILES := $(wildcard include/*.hh)
OBJ_FILES := $(addprefix $(OUTOBJ),$(notdir $(CC_FILES:.cc=.o)))
DICT_FILES := $(wildcard include/*.pcm)
all: VectorDict.cxx sim testGBT
VectorDict.cxx: $(INCLUDEDIR)VectorDict.hh
rootcint -f VectorDict.cxx -c $(CXXFLAGS) -p $ $<
touch VectorDict.cxx
sim: $(SRCDIR)sim.C $(OBJ_FILES) $(HH_FILES) $(DICT_FILES)
$(CXX) $(CXXFLAGS) -o sim $ $< $(GLIBS)
touch sim
testGBT: $(SRCDIR)testGBT.C $(OBJ_FILES) $(HH_FILES)
$(CXX) $(CXXFLAGS) -o testGBT $ $< $(GLIBS)
touch testGBT
$(OUTOBJ)%.o: src/%.cc include/%.hh
$(CXX) $(CXXFLAGS) -c $< -o $@
clean:
rm -f $(OUTOBJ)*.o
rm -rf *.dSYM
rm -f sim
rm -f testGBT
rm -f VectorDict.cxx
rm -f VectorDict_rdict.pcm