forked from BSM3G/Plotter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (39 loc) · 1.09 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
##############################################################
# Author: Andres Florez, Universidad de los Andes, Colombia. #
##############################################################
ObjSuf = o
SrcSuf = cc
ExeSuf =
DllSuf = so
OutPutOpt = -o
HeadSuf = h
ROOTCFLAGS = $(shell root-config --cflags) -O2
ROOTLIBS = $(shell root-config --libs) -O2
# Linux with egcs
CXX = g++ -std=c++11
CXXFLAGS += $(ROOTCFLAGS) -I./ -g
LD = g++ -std=c++11
LDFLAGS += $(ROOTLIBS) -g
SOFLAGS = -shared
LIBS =
SRCDIR = src
OBJDIR = obj
#------------------------------------------------------------------------------
SOURCES = $(wildcard $(SRCDIR)/*.cc)
OBJECTS = $(SOURCES:$(SRCDIR)/%.cc=$(OBJDIR)/%.o)
#------------------------------------------------------------------------------
all: Plotter
Plotter: $(OBJECTS)
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
$(OBJDIR)/%.o: $(SRCDIR)/%.cc
$(CXX) $(CXXFLAGS) -c $< -o $@
%: $(OBJDIR)/%.o
$(LD) $(LDFLAGS) -o $@ $< $(LIBS)
clean:
@echo "Cleaning..."
@ls $(OBJDIR)
@rm -f $(OBJECTS)
job: Plotter
rm *root -f
./Plotter config/201607.config
.SUFFIXES: .$(SrcSuf) .cc .o .so