1 | CC = g++ -O3 -funroll-loops -g |
---|
2 | #CC = g++ -g |
---|
3 | CXX = g++ |
---|
4 | |
---|
5 | OBJS_A = Particle.o testParticle.o |
---|
6 | OBJS_B = lattice.o testLattice.o Particle.o Element.o Collimator.o StandardCollimator.o FlukaCollimator.o MagneticCollimator.o CrystalCollimator.o crystal.o partcrys.o simcrys.o |
---|
7 | OBJS_C = Element.o testElement.o |
---|
8 | OBJS_D = testCollimator.o StandardCollimator.o Collimator.o Element.o Particle.o FlukaCollimator.o MagneticCollimator.o CrystalCollimator.o crystal.o partcrys.o simcrys.o |
---|
9 | OBJS_E = simulation.o icosim++.o Particle.o lattice.o Element.o Collimator.o StandardCollimator.o FlukaCollimator.o MagneticCollimator.o CrystalCollimator.o crystal.o partcrys.o simcrys.o |
---|
10 | OBJS_F = debug.o Element.o Particle.o Collimator.o MagneticCollimator.o |
---|
11 | DEBUG = -g |
---|
12 | # Feel free to fix the errors that appear enabling the Wall flag |
---|
13 | #CFLAGS = -c -Wall |
---|
14 | CFLAGS = -c |
---|
15 | |
---|
16 | LIB = |
---|
17 | LIB_A = |
---|
18 | ifeq ($(FLUKA),yes) |
---|
19 | FLUKAIOlib = |
---|
20 | LIB += $(FLUKAIOlib)/lib/libFlukaIO.a |
---|
21 | LIB_A += -lFlukaIO |
---|
22 | LFLAGS = -L$(FLUKAIOlib)/lib |
---|
23 | INCLUDE = -I $(FLUKAIOlib)/include |
---|
24 | CFLAGS += -DFLUKA |
---|
25 | endif |
---|
26 | |
---|
27 | all: testParticle testLattice icosim++ testElement testCollimator debug twiss_optics |
---|
28 | |
---|
29 | partial: icosim++ twiss_optics |
---|
30 | |
---|
31 | testParticle: $(OBJS_A) |
---|
32 | $(CC) $(OBJS_A) -o testParticle |
---|
33 | testLattice: $(OBJS_B) |
---|
34 | $(CC) $(OBJS_B) $(LIB) -o testLattice $(INCLUDE) |
---|
35 | testElement: $(OBJS_C) |
---|
36 | $(CC) $(OBJS_C) -o testElement |
---|
37 | testCollimator: $(OBJS_D) |
---|
38 | $(CC) $(LFLAGS) $(OBJS_D) -o testCollimator $(INCLUDE) $(LIB) |
---|
39 | icosim++: $(OBJS_E) |
---|
40 | $(CC) $(LFLAGS) $(OBJS_E) -o icosim++ $(INCLUDE) $(LIB) |
---|
41 | debug: $(OBJS_F) |
---|
42 | $(CC) $(OBJS_F) -o debug |
---|
43 | twiss_optics: twiss_optics.cc |
---|
44 | $(CC) twiss_optics.cc -o twiss_optics |
---|
45 | |
---|
46 | |
---|
47 | testParticle.o: testParticle.cc Particle.h |
---|
48 | $(CC) $(CFLAGS) testParticle.cc |
---|
49 | testLattice.o: testLattice.cc lattice.h |
---|
50 | $(CC) $(INCLUDE) $(CFLAGS) testLattice.cc |
---|
51 | testElement.o: testElement.cc Element.h |
---|
52 | $(CC) $(CFLAGS) testElement.cc |
---|
53 | testCollimator.o: testCollimator.cc StandardCollimator.h FlukaCollimator.h MagneticCollimator.h Particle.h |
---|
54 | $(CC) $(INCLUDE) $(CFLAGS) testCollimator.cc |
---|
55 | Particle.o: Particle.cc Particle.h |
---|
56 | $(CC) $(CFLAGS) Particle.cc |
---|
57 | Element.o: Element.cc Element.h |
---|
58 | $(CC) $(CFLAGS) Element.cc |
---|
59 | Collimator.o: Collimator.cc Collimator.h Element.h |
---|
60 | $(CC) $(INCLUDE) $(CFLAGS) Collimator.cc |
---|
61 | StandardCollimator.o: StandardCollimator.h StandardCollimator.cc Collimator.h |
---|
62 | $(CC) $(INCLUDE) $(CFLAGS) StandardCollimator.cc |
---|
63 | FlukaCollimator.o: FlukaCollimator.h FlukaCollimator.cc Collimator.h |
---|
64 | $(CC) $(INCLUDE) $(CFLAGS) FlukaCollimator.cc |
---|
65 | MagneticCollimator.o: MagneticCollimator.h MagneticCollimator.cc Collimator.h |
---|
66 | $(CC) $(INCLUDE) $(CFLAGS) MagneticCollimator.cc |
---|
67 | crystal.o: crystal.cc crystal.h |
---|
68 | $(CC) $(CFLAGS) crystal.cc |
---|
69 | partcrys.o: partcrys.cc partcrys.h crystal.h |
---|
70 | $(CC) $(CFLAGS) partcrys.cc |
---|
71 | simcrys.o: simcrys.cc simcrys.h partcrys.h |
---|
72 | $(CC) $(CFLAGS) simcrys.cc |
---|
73 | CrystalCollimator.o: CrystalCollimator.h CrystalCollimator.cc Collimator.h simcrys.h |
---|
74 | $(CC) $(INCLUDE) $(CFLAGS) CrystalCollimator.cc |
---|
75 | simulation.o: simulation.cc simulation.h lattice.h |
---|
76 | $(CC) $(INCLUDE) $(CFLAGS) simulation.cc |
---|
77 | lattice.o: lattice.cc lattice.h |
---|
78 | $(CC) $(INCLUDE) $(CFLAGS) lattice.cc |
---|
79 | icosim++.o: simulation.h |
---|
80 | $(CC) $(INCLUDE) $(CFLAGS) icosim++.cc |
---|
81 | debug.o: Collimator.h debug.cc |
---|
82 | $(CC) $(INCLUDE) $(CFLAGS) debug.cc |
---|
83 | |
---|
84 | simulation.h: lattice.h |
---|
85 | lattice.h: StandardCollimator.h FlukaCollimator.h MagneticCollimator.h |
---|
86 | StandardCollimator.h: Collimator.h |
---|
87 | FlukaCollimator.h: Collimator.h |
---|
88 | MagneticCollimator.h: Collimator.h |
---|
89 | CrystalCollimator.h: Collimator.h |
---|
90 | Collimator.h: Element.h Particle.h |
---|
91 | |
---|
92 | |
---|
93 | clean: |
---|
94 | rm -rf *.o testParticle testLattice icosim++ testElement testCollimator debug twiss_optics |
---|
95 | |
---|