Make.inc.gfortran.atlas
7.95 KB
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
# IMPORTANT :
# Variable BTREE must have been set to the build directory
# ( export BTREE=/home/daniau/sources/build )
# It is possible to build with the same sources under win32 with PGI Compiler
# For Windows : use a cygwin bash shell and set BTREE using cygwin path ex:
# export BTREE=/c/dev/build
# Location of qmake utility for qt3 and qt4, this is specific to each linux distribution
QMAKE3=/usr/lib/qt3/bin/qmake
QMAKE4=/usr/bin/qmake
# How many thread for Make Qt programs
#NBTHREAD=2
###############################################################################
#
# Extensions
#
# This define the extension names for :
# + static libraries : libext
# + dynamic libraries : soext
# + executable : exext
#
# Uncomment the following according to your platform
# Windows
#libext=.lib
#exext=.exe
# Linux
#
libext=.a
soext=.so
exext=
###############################################################################
#
# Dynamic libraries
#
# Set BUILDSO to y to build dynamic versions of libraries if available
#
# This has been only tested with gfortran under linux for now
###############################################################################
BUILDSO=n
###############################################################################
#
# OpenMP setup
#
# The variable OMP contains either nothing, either the compiler switch to
# enable OpenMP
#
# If you want to build a pure serial version leave OMP empty
# OMP =
# for PGI :
# OMP = -mp
# for gfortran :
# OMP = -fopenmp
###############################################################################
OMP = -fopenmp
###############################################################################
#
# C Compiler Configuration
#
###############################################################################
#
# CC = C compiler
# CFLAGS = flags that are used for compiling C files
#
# Debug setting :
# CC = gcc
# CFLAGS = -g -fpic -m64
#
# Production setting :
# CC = gcc
# CFLAGS = -O2 -fpic -m64
#
# Or for pgcc :
# CC = pgcc
# CFLAGS = -g -fpic
# or CFLAGS = -O2 -fpic
# For Compiling under Windows 32bits with PGI add -DPGIW32 to CFLAGS
#CC = pgcc
#CFLAGS = -O2 -Bstatic -DPGIW32
CC = gcc
CFLAGS = -O2 -fpic
###############################################################################
#
# Fortran 95 Compiler Configuration
#
###############################################################################
#
# F95 = fortran 95 compiler
# F95FLAGS = flags to be used when building objects
#
# Debug settings
# F95 = pgf95
# F95FLAGS = -g -fpic -I$(BTREE)/modules
#
# Production settings
# F95 = pgf95
# F95FLAGS = -fastsse -Mipa=fast -fpic -I$(BTREE)/modules
#
# Note that .mod files will be put in $(BTREE)/modules by makefiles
# this is the reason for -I$(BTREE)/modules
#
# An other note for portland compiler at least : by default the compiler will use
# all possible optimisations for the current processor, so the binaries may or may not
# work on another one. For example a binary compiled on an Opteron64 may not work
# on an Intel x86_64. If you plan to use your binaries on different platforms,
# you should use the -tp option
#
# -tp k8-64 => produce a binary optimized for AMD Opteron family
# -tp p7-64 => produce a binary optimized for Intel x64 processors
# -tp x64 => produce an unified binary which will run on both AMD and Intel
# no -tp option => produce a binary optimized for the running processor
#F95 = pgf95
#F95FLAGS = -g -fpic -I$(BTREE)/modules
#F95FLAGS = -fastsse -fpic -I$(BTREE)/modules
F95 = gfortran
F95FLAGS = -ffree-line-length-none -O2 -fpic -I$(BTREE)/modules
# For Compiling under Windows 32bits with PGI
# Paths for -I must be specified in a windows way (not cygwin way)
# that is -I"c:\dev\build\modules" and not -I/c/dev/build/modules
#F95 = pgf95
#F95FLAGS = -g -Munix -Bstatic -I"c:\dev\build\modules"
# Win32 production setting :
#F95FLAGS = -fastsse -Munix -Bstatic -I"c:\dev\build\modules"
###############################################################################
#
# Linking Configuration
#
###############################################################################
#
# LINK = linker program, usually same as compiler
# LINKFLAGS = flags to be used when linking programs
#
# Debug settings
# LINK = pgf95
# LINKFLAGS = -g -L$(BTREE)/lib
#
# Production settings
# LINK = pgf95
# LINKFLAGS = -fastsse -Mipa=fast -L$(BTREE)/lib
#
# Note that .a files will be put in $(BTREE)/lib by makefiles
# this is the reason for -L$(BTREE)/lib
#LINK = pgf95
#LINKFLAGS = -g -L$(BTREE)/lib
#LINKFLAGS = -fastsse -L$(BTREE)/lib
LINK = gfortran
LINKFLAGS = -ffree-line-length-none -O2 -L$(BTREE)/lib
# For Compiling under Windows 32bits with PGI
# Paths for -I must be specified in a windows way (not cygwin way)
# that is -L"c:\dev\build\lib" and not -I/c/dev/build/lib
#LINK = pgf95
#LINKFLAGS = -g -Munix -Bstatic -L"c:\dev\build\lib"
# Win32 production setting :
#LINKFLAGS = -fastsse -Munix -Bstatic -L"c:\dev\build\lib"
###############################################################################
#
# BLAS/LAPACK/ACML Configuration
#
###############################################################################
#
# Location of blas and lapack
#
# Commercial fortran compilers comes with their own optimized versions of blas
# and lapack. If you're running on an AMD processor, you should use acml
# http://developer.amd.com/acml.jsp , which is an optimized version of both
# blas and lapack (and also some more functionnalities).
#
# Our Portland Fortran compiler comes with the 3 libraries. As we're running
# AMD processors, we use acml.
#
# EXTERNALLIBPATH may contain a -Ldirectory directive
# LAPACK = directive for lapack
# BLAS = directive for blas
# ACML = directive for acml
#
# Example 1:
# EXTERNALLIBPATH = -L/usr/local/pgi/linux86-64/6.1/lib/
# LAPACK = -llapack
# BLAS = -lblas
# ACML =
#
# Example 2:
# EXTERNALLIBPATH =
# LAPACK = /usr/local/pgi/linux86-64/6.1/lib/liblapack.a
# BLAS = /usr/local/pgi/linux86-64/6.1/lib/libblas.a
# ACML =
#
# Example 3:
# EXTERNALLIBPATH = -L/usr/local/pgi/linux86-64/6.1/lib/
# LAPACK =
# BLAS =
# ACML = -lacml
#
# Example 4:
# EXTERNALLIBPATH =
# LAPACK =
# BLAS =
# ACML = /usr/local/pgi/linux86-64/6.1/lib/libacml.a
#
# Simple rule is that if you set ACML then leave BLAS and LAPACK empty.
#
#
#EXTERNALLIBPATH =
#LAPACK =
#BLAS =
#ACML = /usr/local/pgi/linux86-64/7.0/lib/libacml.a
# With gfortran and reference implementation
#EXTERNALLIBPATH =
#LAPACK = $(BTREE)/lib/lapack_LINUX.a
#BLAS = $(BTREE)/lib/blas_LINUX.a
#ACML =
# With gfortran and acml
#EXTERNALLIBPATH =
#LAPACK =
#BLAS =
#ACML = /usr/local/acml4.1.0/gfortran64/lib/libacml.a
# With atlas compiled with gfortran and gcc
#EXTERNALLIBPATH =
#LAPACK = $(BTREE)/lib/liblapack.a
#BLAS = $(BTREE)/lib/libf77blas.a $(BTREE)/lib/libcblas.a $(BTREE)/lib/libatlas.a
#PTBLAS = $(BTREE)/lib/libptf77blas.a $(BTREE)/lib/libptcblas.a $(BTREE)/lib/libatlas.a
#ACML =
# With dynamic versions of atlas compiled with gfortran and gcc
EXTERNALLIBPATH =
LAPACK = $(BTREE)/lib/liblapack.so
BLAS = $(BTREE)/lib/libf77blas.so $(BTREE)/lib/libcblas.so $(BTREE)/lib/libatlas.so
ACML =
# Libs that may be necessary for compiling umfpack, for exemple
# EXTRALIBS = -lm -L/usr/local/pgi/linux86-64/7.0/lib -lpgftnrtl -lpgc -lrt
# is necessary for using portland fortran blas
#
#EXTRALIBS = -lm -L/usr/local/pgi/linux86-64/7.0/lib -lpgftnrtl -lpgc -lrt
#EXTRALIBS = -lm
# Win32 settings
#EXTERNALLIBPATH =
#LAPACK = -llapack
#BLAS = -lblas
#ACML =
#EXTRALIBS = -llapack -lpgftnrtl
###############################################################################
#
# FVN Configuration
#
###############################################################################
#
# LINKFVN should not be changed, it defines the linking directives to link
# with fvn as it needs both blas and lapack, and also umfpack and amd
# which are both compiled within fvn
#
#LINKFVN = -lfvn -lfvn_fnlib -lumfpack -lamd $(EXTERNALLIBPATH) $(LAPACK) $(BLAS) $(ACML)
LINKFVN = -lfvn $(EXTERNALLIBPATH) $(LAPACK) $(BLAS) $(ACML)
#
# AR = archive utility
#
AR = ar
RANLIB = ranlib