-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGNUmakefile
110 lines (83 loc) · 2.5 KB
/
GNUmakefile
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
##################################
# $Id: GNUmakefile,v 1.24 2008/11/30 02:42:01 bacmj Exp $
##################################
#EXEDIR=.
#EXEN=clstr.x
SRCS= \
iblock.F90 \
flipspin.F90 \
energy_ccc.F90 \
diags.F90 \
renorm_utils.F90 \
ising_4x4_partfun.F90 \
ising_NxN_partfun.F90 \
ising_MC_partfun.F90 \
ising_MC_rlzn.F90 \
rg_NxN_rlzn.F90 \
rg_NxNp_rlzn.F90 \
rg_4x4_rlzn.F90 \
rg_MC_rlzn.F90 \
rg_MCb_rlzn.F90 \
rng_sub2.F90 \
linsys.F90 \
rng_drv.F90 \
ising_NxN_drv.F90 \
ising_MC_drv.F90 \
rg_4x4_drv.F90 \
rg_MC_drv.F90 \
minrg_drv.F90
COMPILER=gfortran
HOST=$(shell hostname)
UNAME=$(shell uname -s)
OBJS= ${SRCS:.F90=.o}
F77_FLAGS=
STD_FLAGS=-c
ifeq ($(COMPILER),gfortran)
#STD_FLAGS := $(STD_FLAGS) -O3 -fdollar-ok -DGFORTRAN
STD_FLAGS := $(STD_FLAGS) -g -fdollar-ok -fbounds-check -fdefault-real-8 -DGFORTRAN
endif
ifeq ($(COMPILER),pgf95)
STD_FLAGS := $(STD_FLAGS) -g
endif
F90_FLAGS=$(PFLAGS) $(STD_FLAGS) $(USER_FDEFS)
CPP_FLAGS=-P -DALPHA_MACH
ifeq ($(UNAME),Linux)
LAFLAGS=-L/usr/lib64 -llapack -lblas
endif
ifeq ($(UNAME),Darwin)
LAFLAGS=-L/Users/juliob/lapack-3.8.0 -llapack -lrefblas
endif
#-----------------------------------------------------
# These files (RHS) are used by almost everyone.
# So, safer just to rebuild everything if they change.
#-----------------------------------------------------
%.o: %.F90
$(COMPILER) $(F90_FLAGS) $<
objtest: GNUmakefile
echo $(OBJS)
rng: $(OBJS)
$(COMPILER) iblock.o rng_sub2.o rng_drv.o -o rng.x
isinxn: $(OBJS)
$(COMPILER) ising_NxN_partfun.o ising_nxn_drv.o -o isinxn.x
isimc: $(OBJS)
$(COMPILER) energy_ccc.o ising_MC_partfun.o ising_MC_rlzn.o ising_mc_drv.o -o isimc.x
ising: $(OBJS)
$(COMPILER) diags.o ising_MC_rlzn.o ising_MC_drv.o -o ising.x
rgmc: $(OBJS)
$(COMPILER) $(LAFLAGS) diags.o rg_MCb_rlzn.o rg_NxN_rlzn.o rg_4x4_rlzn.o rg_MC_drv.o -o rgmc.x
rg4x4: $(OBJS)
$(COMPILER) $(LAFLAGS) renorm_utils.o rg_MCb_rlzn.o rg_NxNp_rlzn.o rg_4x4_rlzn.o rg_4x4_drv.o -o rg4x4.x
minrg: $(OBJS)
$(COMPILER) $(LAFLAGS) renorm_utils.o minrg_drv.o -o minrg.x
linsys: $(OBJS)
$(COMPILER) $(LAFLAGS) linsys.o -o linsys.x
testlapack:
$(COMPILER) -fdefault-real-8 testlapack.F90 -L/Users/juliob/lapack-3.8.0 -llapack -lrefblas -o testlapack.x
cleancode :
/bin/rm -f *.o *.a *.x *.mod *.dvi *.ps *.pdf *.ofl *.aux *.log *~
clean :
/bin/rm -f *.o *.a *.x *.mod *.dvi *.ps *.pdf *.ofl *.aux *.log *~ fort.* share/*~ idlpros/*~
enviro :
@echo "HOST = "$(HOST)
@echo "OS = "$(UNAME)
@echo "LAPACK flags = "$(LAFLAGS)