-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
69 lines (50 loc) · 1.58 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
CCC = g++
OPT = -O0 -g -DDEBUG
CFLAGS="-I/usr/include/gsl"
LDFLAGS=-lgsl -lgslcblas
bin = taun mn_test fh_test
lib = libTAUn.so
base = taun_vars TauData
src = $(base:=.cc)
inc = $(base:=.h)
obj = $(base:=.o)
DEBUG ?= -O3 -DDEBUG
CXXFLAGS += $(DEBUG) -fPIC
SHFLAGS ?= -shared -Wl,-soname,
ROOTCINT = rootcint
ROOTFLAGS ?= $(shell root-config --cflags)
ROOTLIBS ?= $(shell root-config --glibs)
LDLIBS += $(shell $(ROOTSYS)/bin/root-config --libs)
all: bin lib
bin: $(bin)
lib: $(lib)
clean:
rm -f *.o *_cc.d *_cc.so *_C.d *_C.so *Dict.*
veryclean: clean
rm -f $(bin) $(lib)
$(bin): %: %.o $(obj) $(lib:.so=_Dict.o)
$(CXX) -o $@ $(CXXFLAGS) $(ROOTLIBS) $^
$(lib): %.so: $(obj) %_Dict.o
$(CXX) -o $@ $(CXXFLAGS) $(SHFLAGS)$@ $^
libTAUn_Dict.cc: $(inc) LinkDef.h
$(ROOTCINT) -f $@ -c -p $^
%_Dict.cc: %.h %_LinkDef.h
$(ROOTCINT) -f $@ -c -p $^
$(obj): %.o: %.h
TauData.o: $(inc)
taun.o: TauData.h
taun: libTAUn_Dict.o
detsigave: detsigave.cc TauData.cc
$(CCC) $(OPT) -o detsigave $(ROOTFLAGS) $^ -L, -l TreePlayer $(ROOTLIBS)
multi_series: multi_series.cc TauData.cc
$(CCC) $(OPT) -o multi_series $(ROOTFLAGS) $^ -L, -l TreePlayer $(ROOTLIBS)
multi_seriesv: multi_seriesv.cc TauData.cc
$(CCC) $(OPT) -o multi_seriesv $(ROOTFLAGS) $^ -L, -l TreePlayer $(ROOTLIBS)
monitoring: monitoring.cc TauData.cc
$(CCC) $(OPT) -o monitoring $(ROOTFLAGS) $^ -L, -l TreePlayer $(ROOTLIBS)
clean:
rm -f *.o *~ */*.e4* */*.pe4* */*.po4* detsigave
%.o:%.cc
$(CXX) -o $@ -c $(CXXFLAGS) $(CPPFLAGS) $(ROOTFLAGS) $<
%.o:%.C
$(CXX) -o $@ -c $(CXXFLAGS) $(CPPFLAGS) $(ROOTFLAGS) $<