-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·85 lines (61 loc) · 1.86 KB
/
Copy pathMakefile
File metadata and controls
executable file
·85 lines (61 loc) · 1.86 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#---------------------------------------
# Resources section - Symbol definitions
#---------------------------------------
ROOTFLAGS = $(shell root-config --cflags)
ROOTLIBS = $(shell root-config --libs)
#THREAD = -lpthread
CXX := g++
#CXX := clang++
CXXFLAGS := -std=c++11 #-stdlib=libstdc++
#CXXFLAGS := -std=c++11 -stdlib=libc++
C++ = clang -O
LIB = monitor.a
AR = ar -r
C++ = clang -O
LIB = monitor_both.a
AR = ar -r
C++ = clang -O
LIB = create_data.a
AR = ar -r
#----------------------
# Makefile head section
#----------------------
all:
make create_data monitor monitor_both
create_data: create_data.o $(LIB)
$(CXX) $(CXXFLAGS) -o create_data create_data.o $(ROOTFLAGS) $(ROOTLIBS)
monitor: monitor.o $(LIB)
$(CXX) $(CXXFLAGS) -o monitor monitor.o $(ROOTFLAGS) $(ROOTLIBS)
monitor_both: monitor_both.o $(LIB)
$(CXX) $(CXXFLAGS) -o monitor_both monitor_both.o $(ROOTFLAGS) $(ROOTLIBS)
clean:
rm -f *.o *.a
cleanall:
rm -f *.o *.a create_data monitor monitor_both
#----------------------------------
# Dependencies for the source files
#----------------------------------
CREATE_DATA_CPP_DEP = \
functions.h \
MONITOR_CPP_DEP = \
functions.h \
MONITOR_BOTH_CPP_DEP = \
functions.h \
#--------------------------------
# Compilation of the source files
#--------------------------------
create_data.o : create_data.cxx $(CREATE_DATA_CPP_DEP)
$(CXX) $(CXXFLAGS) -c create_data.cxx -o create_data.o $(ROOTFLAGS)
monitor.o : monitor.cxx $(MONITOR_CPP_DEP)
$(CXX) $(CXXFLAGS) -c monitor.cxx -o monitor.o $(ROOTFLAGS)
monitor_both.o : monitor_both.cxx $(MONITOR_BOTH_CPP_DEP)
$(CXX) $(CXXFLAGS) -c monitor_both.cxx -o monitor_both.o $(ROOTFLAGS)
#----------------------------------
# Library dependencies and creation
#----------------------------------
LIB_DEP = \
create_data.o \
monitor.o\
monitor_both.o\
$(LIB) : $(LIB_DEP)
$(AR) $(LIB) $(LIB_DEP) $(POST_AR)