-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (47 loc) · 1.39 KB
/
Makefile
File metadata and controls
65 lines (47 loc) · 1.39 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
#makefile
CC = g++
CCVERSIONGTEQ48 := $(shell expr `g++ -dumpversion | cut -f1,2 -d.` \>= 4.8)
#UCFLAGS = -O0 -g3 -Wall -gstabs+ -DSTANDALONE
UCFLAGS = -O3 -Wall -DSTANDALONE
# RUCFLAGS := $(shell root-config --cflags) -I./interface/ -I/usr/include/python2.6/ -std=c++14
# LIBS := $(shell root-config --libs) -lpython2.6 -lboost_python
PYTHONPATH :=$(shell dirname `which python`)/../
RUCFLAGS := $(shell root-config --cflags) -I./interface/ -I$(PYTHONPATH)/include/python2.7 -std=c++14
LIBS := $(shell root-config --libs) -L$(PYTHONPATH)/lib64 -lpython2.7 -lboost_python
vpath %.cpp ./src/json
vpath %.cpp ./src
vpath %.cpp ./bin
SRCPP = main.cpp\
Cell.cpp\
Point.cpp\
Rectangle.cpp\
Tree.cpp\
Geometry.cpp\
Generator.cpp\
Parameters.cpp\
ShowerParametrization.cpp\
ShowerShape.cpp\
ShowerShapeHexagon.cpp\
ShowerShapeTriangle.cpp\
Event.cpp\
OutputService.cpp\
jsoncpp.cpp\
#OBJCPP = $(SRCPP:.cpp=.o)
OBJCPP = $(patsubst %.cpp,lib/%.o,$(SRCPP))
ifeq "$(CCVERSIONGTEQ48)" "0"
$(error Requires g++ version >= 4.8)
endif
all : bin/shower_simulation.exe
lib/%.o : %.cpp
@echo "> compiling $*"
@mkdir -p lib/
@$(CC) -c $< $(UCFLAGS) $(RUCFLAGS) -o $@
bin/shower_simulation.exe : $(OBJCPP)
@echo "> linking"
$(CC) $^ $(LIBS) -o $@
clean:
@echo "> Cleaning object files"
@rm -f lib/*.o
cleanall: clean
@echo "> Cleaning executable"
@rm -f bin/shower_simulation.exe