-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (45 loc) · 1.44 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
OBJDIR = $(GARFIELD_HOME)/Object
SRCDIR = $(GARFIELD_HOME)/Source
INCDIR = $(GARFIELD_HOME)/Include
HEEDDIR = $(GARFIELD_HOME)/Heed
LIBDIR = $(GARFIELD_HOME)/Library
# Directory which contains TGeoToStep.h file. It is not installed by root by default (bug?)
#GEOCADDIR = /home/bblidaru/Software/root-6.06.00/geom/geocad/inc/
# Compiler flags
CFLAGS = -Wall -Wextra -Wno-long-long -Wno-unused -Wno-unused-parameter \
`root-config --cflags` -std=c++11 \
-O1 -fno-common -c \
-I$(INCDIR) -I$(HEEDDIR)
# Debug flags
CFLAGS += -g
LDFLAGS = `root-config --glibs` -lGeom -lgfortran -lm
LDFLAGS += -L$(LIBDIR) -lGarfield
LDFLAGS += -g
all: clean micromegas plain low graf
clean:
rm -f micromegas.o
rm -f field.o
rm -f drift.o
rm -f geometry.o
rm -f micromegas
rm -f plot.o
plain: src/plain.cpp
$(CXX) $(CFLAGS) src/plain.cpp
$(CXX) -o plain plain.o $(LDFLAGS)
rm plain.o
micromegas: src/micromegas.cpp
$(CXX) $(CFLAGS) src/micromegas.cpp src/field.cpp src/drift.cpp src/geometry.cpp src/plot.cpp
$(CXX) -o micromegas micromegas.o field.o drift.o geometry.o plot.o $(LDFLAGS)
rm micromegas.o
rm field.o
rm drift.o
rm geometry.o
rm plot.o
low: src/mm_low_working_salome.cpp
$(CXX) $(CFLAGS) src/mm_low_working_salome.cpp
$(CXX) -o low mm_low_working_salome.o $(LDFLAGS)
rm mm_low_working_salome.o
graf: src/graf_pres.cpp
$(CXX) $(CFLAGS) src/graf_pres.cpp
$(CXX) -o graf_pres graf_pres.o $(LDFLAGS)
rm graf_pres.o