-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
51 lines (38 loc) · 1.16 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
44
45
46
47
48
49
50
51
CXX = $(shell root-config --cxx)
LD = $(shell root-config --ld)
INC = $(shell pwd)
Repo = $(shell git rev-parse --show-toplevel)
SRC = $(Repo)/src
CPPFLAGS := $(shell root-config --cflags) -I$(INC)/include
LDFLAGS := $(shell root-config --glibs)
CPPFLAGS += -g -std=c++14
TARGET = ConvertDat2Root
SRC = app/ConvertDat2Root.cc src/Aux.cc src/Config.cc
TARGET2 = Rereco
SRC2 = app/Rereco.cc src/Aux.cc src/Config.cc
TARGET3 = ConvertDat2RootWithPixels
SRC3 = app/ConvertDat2RootWithPixels.cc src/Aux.cc src/Config.cc
TARGET4 = SkimTree
SRC4 = app/SkimTree.cc
OBJ = $(SRC:.cc=.o)
OBJ2 = $(SRC2:.cc=.o)
OBJ3 = $(SRC3:.cc=.o)
OBJ4 = $(SRC4:.cc=.o)
all : $(TARGET) $(TARGET2) $(TARGET3) $(TARGET4)
$(TARGET) : $(OBJ)
@echo $@
$(LD) $(CPPFLAGS) -o $(TARGET) $(OBJ) $(LDFLAGS)
$(TARGET2) : $(OBJ2)
@echo $@
$(LD) $(CPPFLAGS) -o $(TARGET2) $(OBJ2) $(LDFLAGS)
$(TARGET3) : $(OBJ3)
@echo $@
$(LD) $(CPPFLAGS) -o $(TARGET3) $(OBJ3) $(LDFLAGS)
$(TARGET4) : $(OBJ4)
@echo $@
$(LD) $(CPPFLAGS) -o $(TARGET4) $(OBJ4) $(LDFLAGS)
%.o : %.cc
@echo $@
$(CXX) $(CPPFLAGS) -o $@ -c $<
clean :
rm -f *.o app/*.o src/*.o $(Aux)/src/*.o $(TARGET) $(TARGET2) $(TARGET3) $(TARGET4) *~