1 |
cafagna |
3.1 |
# --------------------------------------------------------------------------- # |
2 |
|
|
# Make file for Garfield, written for Linux. # |
3 |
|
|
# Author: Jeff Templon <templon@studbolt.physast.uga.edu> # |
4 |
|
|
# Compilation options from Florin Cotorobai <Florin.Cotorobai@cern.ch> # |
5 |
|
|
# Based on a file from Michel Roethlisberger, IBM Switzerland. # |
6 |
|
|
# --------------------------------------------------------------------------- # |
7 |
|
|
FC = g77 |
8 |
cafagna |
3.2 |
LF= `cernlib graflib/X11,kernlib,mathlib,packlib` |
9 |
cafagna |
3.1 |
# FF= -O |
10 |
cafagna |
3.3 |
# FF Flags mod by CAF on 2 Oct 2007 , obsolete options changed |
11 |
|
|
# FF= -O3 -malign-double -malign-loops=2 -malign-jumps=2 -malign-functions=2\ |
12 |
|
|
# -fno-init-local-zero -ffast-math -fno-f2c\ |
13 |
|
|
# -fforce-mem -fforce-addr -fcaller-saves -fstrength-reduce\ |
14 |
|
|
# -funroll-loops -frerun-cse-after-loop \ |
15 |
|
|
# -g -fdebug-kludge |
16 |
mocchiut |
3.4 |
FF= -m32 -O3 -malign-double -falign-loops=2 -falign-jumps=2 -falign-functions=2\ |
17 |
cafagna |
3.1 |
-fno-init-local-zero -ffast-math -fno-f2c\ |
18 |
|
|
-fforce-mem -fforce-addr -fcaller-saves -fstrength-reduce\ |
19 |
|
|
-funroll-loops -frerun-cse-after-loop \ |
20 |
cafagna |
3.3 |
-g |
21 |
|
|
# end CAF mod |
22 |
cafagna |
3.1 |
# G77_LIB_DIR=/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3 |
23 |
|
|
# LF=-m elf_i386 -dynamic-linker /lib/ld-linux.so.1 -s -x -L$(G77_LIB_DIR) |
24 |
|
|
# LNKPRE=/usr/lib/crt1.o /usr/lib/crti.o $(G77_LIB_DIR)/crtbegin.o |
25 |
|
|
# LNKEPI=-lf2c -lm -lgcc -lc -lgcc $(G77_LIB_DIR)/crtend.o /usr/lib/crtn.o |
26 |
|
|
# LNKCERN=`/cern/pro/bin/cernlib graflib/X11,kernlib,mathlib,packlib` |
27 |
|
|
|
28 |
|
|
garfield-7: main-7.o |
29 |
|
|
$(FC) -o garfield-7 *.o $(LF) |
30 |
|
|
rm *.o |
31 |
|
|
|
32 |
|
|
main-7.o: main-7.f |
33 |
|
|
$(FC) -c $(FF) *.f |
34 |
|
|
rm *.f |
35 |
|
|
|
36 |
|
|
main-7.f: garfield-7.f |
37 |
cafagna |
3.2 |
fcasplit garfield-7.f |
38 |
cafagna |
3.1 |
-rm garfield-7.f garfield-7.mkfca garfield-7.shfca y.lis |
39 |
|
|
mv main.f main-7.f |
40 |
|
|
|
41 |
|
|
garfield-7.f: garfield-7.car magboltz-2.car heed101garf.car garfield-7.cra |
42 |
|
|
-rm *.f *.o |
43 |
|
|
./patchy_step garfield-7 |
44 |
|
|
|
45 |
|
|
libgarfield-7.a: garfield-7.f |
46 |
cafagna |
3.2 |
fcasplit garfield-7.f |
47 |
cafagna |
3.1 |
rm main.f garfield-7.f garfield-7.mkfca garfield-7.shfca y.lis |
48 |
|
|
$(FC) -c $(FF) *.f |
49 |
|
|
ar crv libgarfield-7.a *.o |
50 |
|
|
ranlib libgarfield-7.a |
51 |
|
|
|
52 |
|
|
garfield: main.o |
53 |
|
|
$(FC) -o garfield *.o $(LF) |
54 |
|
|
rm *.o |
55 |
|
|
|
56 |
|
|
# garfield: main.o |
57 |
|
|
# ld $(LF) -o garfield *.o $(LNKPRE) $(LNKCERN) $(LNKEPI) |
58 |
|
|
|
59 |
|
|
main.o: main.f |
60 |
|
|
$(FC) -c $(FF) *.f |
61 |
|
|
rm *.f |
62 |
|
|
|
63 |
|
|
# main.o: main.f |
64 |
|
|
# $(FC) -c *.f |
65 |
|
|
# rm *.f |
66 |
|
|
|
67 |
|
|
main.f: garfield.f |
68 |
cafagna |
3.2 |
fcasplit garfield.f |
69 |
cafagna |
3.1 |
rm garfield.f garfield.mkfca garfield.shfca y.lis |
70 |
|
|
|
71 |
|
|
garfield.f: garfield.car maggarf.car heed101garf.car garfield.cra |
72 |
|
|
-rm *.f *.o |
73 |
|
|
./patchy_step garfield |
74 |
|
|
|
75 |
|
|
garfield.car: |
76 |
|
|
copy_garfield |
77 |
|
|
|
78 |
|
|
maggarf.car: |
79 |
|
|
copy_maggarf |
80 |
|
|
|
81 |
|
|
heed101garf.car: |
82 |
|
|
copy_heed |
83 |
|
|
|
84 |
|
|
help: garfield.rawhelp |
85 |
|
|
-rm garfield.packhelp |
86 |
|
|
./garfield-7 -noinput -noterminal -metafile < help_input |
87 |
|
|
rm garfield.metafile |
88 |
|
|
|
89 |
|
|
interface: interface.a |
90 |
|
|
echo Done making interface.a. |
91 |
|
|
|
92 |
|
|
interface.f: garfield.car interface.cra |
93 |
|
|
-rm interface.f |
94 |
|
|
patchy_step interface |
95 |
|
|
rm y.lis |
96 |
|
|
|
97 |
|
|
interface.a: interface.f |
98 |
|
|
g77 -c $(FF) -o interface.o interface.f |
99 |
|
|
-rm interface.a |
100 |
|
|
ar -q interface.a interface.o |
101 |
|
|
ranlib interface.a |
102 |
|
|
rm interface.f |
103 |
|
|
rm interface.o |