-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (38 loc) · 1.11 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
ROOTCONFIG := root-config
ObjSuf = o
SrcSuf = cxx
DllSuf = so
OutPutOpt = -o # keep whitespace after "-o"
CXX = g++
CXXFLAGS = -O -Wall -fPIC -g
LD = g++
LDFLAGS = -O
SOFLAGS = -shared
ROOTCFLAGS := $(shell $(ROOTCONFIG) --cflags)
ROOTLDFLAGS := $(shell $(ROOTCONFIG) --ldflags)
ROOTLIBS := $(shell $(ROOTCONFIG) --libs)
ROOTGLIBS := $(shell $(ROOTCONFIG) --glibs)
HASTHREAD := $(shell $(ROOTCONFIG) --has-thread)
CXXFLAGS += $(ROOTCFLAGS)
LDFLAGS += $(ROOTLDFLAGS)
LIBS = $(ROOTLIBS) $(SYSLIBS)
GLIBS = $(ROOTGLIBS) $(SYSLIBS)
DEPS = physics.h BaseGen.h BasePart.h CompGen.h Pi0PGen.h PiPNGen.h
.SUFFIXES: .$(SrcSuf)
# programs
TG = EventGen$(ExeSuf)
TGO = EventGen.$(ObjSuf)
TGS = EventGen.$(SrcSuf)
OBJS = $(TGO)
PROGRAMS = $(TG)
all: $(PROGRAMS)
EventGen.$(SrcSuf): $(DEPS) Makefile
EventGen.$(ObjSuf): $(DEPS) Makefile
$(TG): $(TGO)
$(LD) $(LDFLAGS) $^ $(LIBS) $(OutPutOpt)$@
@echo "$@ done"
.$(SrcSuf).$(ObjSuf):
$(CXX) $(CXXFLAGS) -c $<
clean:
@echo "cleaning up..."
@rm -f $(OBJS) core* out/*.root