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