forked from MOLFDIR/MOLFDIR
-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile.h
executable file
·251 lines (232 loc) · 6.24 KB
/
makefile.h
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
###################################################
# #
# makefile.h definitions file for MOLFDIR program #
# #
###################################################
TARGET = $(MOLFDIR_TARGET)
ifdef MOLFDIR_PAR
PARALLEL = yes
endif
#
# Definitions for target HP
#
ifeq ($(TARGET),HP)
ifdef PARALLEL
error1:
@echo No parallel setup for $(TARGET)
exit 1
FCOMPILER_DATA = mpif90 +U77 +O3 -K -DHP9 -DPARALLEL -DVAR_MPI
CCOMPILER_DATA = mpicc -Ae -DHP9 -DPARALLEL -DVAR_MPI
else
FCOMPILER_DATA = f90 +U77 +O3 -K -DHP9
CCOMPILER_DATA = cc -Ae -DHP9
ARGOSMAC = hp
endif
endif
#
# Definitions for target IBM
#
ifeq ($(TARGET),IBM)
ifdef PARALLEL
FCOMPILER_DATA = mpxlf -O3 -qdpc -qstrict -WF,-DIBM,-DPARALLEL,-DVAR_MPI -qnosave
CCOMPILER_DATA = mpcc -DIBM
FINCLUDE_DIR = -WF,-I/usr/lpp/ppe.poe/include
other_options = -L /usr/lpp/ppe.poe/lib/libmpi.a -bmaxdata:550000000
else
FCOMPILER_DATA = xlf -O3 -qstrict -qdpc -WF,-DIBM
CCOMPILER_DATA = cc -DIBM
ARGOSMAC = rs6000
other_options = -bmaxdata:550000000
endif
endif
#
# Definitions for target IBM64
#
ifeq ($(TARGET),IBM64)
ifdef PARALLEL
error1:
@echo No parallel setup for $(TARGET)
exit 1
else
FCOMPILER_DATA = xlf -O3 -qstrict -qdpc -q64 -WF,-DIBM
CCOMPILER_DATA = cc -DIBM -q64
ARGOSMAC = rs6000
endif
endif
#
# Definitions for target LINUX
#
ifeq ($(TARGET),LINUX)
ifdef PARALLEL
error1:
@echo No parallel setup for $(TARGET)
exit 1
FCOMPILER_DATA = mpif77 -O3 -ffast-math -fautomatic -fno-f2c -fno-globals -Wno-globals -DLINUX -DPARALLEL -DVAR_MPI
CCOMPILER_DATA = mpicc -DLINUX -DPARALLEL -DVAR_MPI
FINCLUDE_DIR = -I<your mpich-1.2.2 location>/include
lib_other = -L<your mpich-1.2.2 location>/lib -lmpich -lm -ldl -lieee
else
# FCOMPILER_DATA = g77 -O3 -ffast-math -fautomatic -fno-f2c -fno-globals -Wno-globals -DLINUX
FCOMPILER_DATA = gfortran -O3 -ffast-math -DLINUX
CCOMPILER_DATA = gcc -DLINUX
# lib_other = -ldl -lieee -lm
lib_other =
ARGOSMAC = linux
endif
endif
#
# Definitions for target SUN
#
ifeq ($(TARGET),SUN)
ifdef PARALLEL
error1:
@echo No parallel setup for $(TARGET)
exit 1
else
FCOMPILER_DATA = f77 -O2 -DSUN -xlic_lib=sunperf -lmvec
CCOMPILER_DATA = cc -DSUN
ARGOSMAC = sun
endif
endif
#
# Definitions for target CRAYC90 (also works for CRAYJ90)
#
ifeq ($(TARGET),CRAYC90)
ifdef PARALLEL
error1:
@echo No parallel setup for $(TARGET)
exit 1
else
FCOMPILER_DATA = f90 -c -d p -F -O scalar3,aggress,vector3 -DCRAY -DBIT64
CCOMPILER_DATA = cc -DCRAY -DBIT64
lib_other = -Wl-lnag
ARGOSMAC = xmp
endif
endif
#
# Definitions for target CRAYT3E
#
ifeq ($(TARGET),CRAYT3E)
ifdef PARALLEL
FCOMPILER_DATA = f90 -dp -F -O3,unroll2,msgs,negmsgs -R nb -Wl,-Dstreams=on -DCRAY -DBIT64 -DPARALLEL -DVAR_MPI
CCOMPILER_DATA = cc -DCRAY -DBIT64 -DPARALLEL -DVAR_MPI
lib_other = -lnag
else
FCOMPILER_DATA = f90 -dp -F -O3,unroll2,msgs,negmsgs -R nb -Wl,-Dstreams=on -DCRAY -DBIT64
CCOMPILER_DATA = cc -DCRAY -DBIT64
lib_other = -lnag
ARGOSMAC = T3E64
endif
endif
#
# Definitions for target SGI32
#
# Parallel definition below compiles/runs with mpich-1.2.2. Adjust for your needs.
#
ifeq ($(TARGET),SGI32)
ifdef PARALLEL
error1:
@echo No parallel setup for $(TARGET)
exit 1
FCOMPILER_DATA = f77 -O1 -n32 -mips4 -G 0 -woff 2290 -DSGI -static -DPARALLEL -DVAR_MPI
CCOMPILER_DATA = cc -O1 -n32 -mips4 -G 0 -DSGI -DPARALLEL -DVAR_MPI
FINCLUDE_DIR = -I <your mpich-1.2.2 location>/include
lib_other = -lcomplib.sgimath -L<your mpich-1.2.2 location>/lib
other_options =
else
FCOMPILER_DATA = f77 -O1 -n32 -mips4 -G 0 -woff 2290 -DSGI -static
CCOMPILER_DATA = cc -O1 -n32 -mips4 -G 0 -DSGI
lib_other = -lcomplib.sgimath
ARGOSMAC = sgipower
endif
endif
#
# Definitions for target SGI64
#
# Parallel definition below compiles/runs with mpich-1.2.2. Adjust for your needs.
#
ifeq ($(TARGET),SGI64)
ifdef PARALLEL
error1:
@echo No parallel setup for $(TARGET)
exit 1
FCOMPILER_DATA = mpif77 -O1 -64 -mips4 -G 0 -woff 2290 -DPARALLEL -DSGI -static -DVAR_MPI
CCOMPILER_DATA = mpicc -O1 -64 -mips4 -G 0 -DSGI -DPARALLEL
FINCLUDE_DIR = -I<your mpich-1.2.2 location>/include
lib_other = -lcomplib.sgimath -L<your mpich-1.2.2 location>/lib
else
FCOMPILER_DATA = f77 -O1 -64 -mips4 -G 0 -woff 2290 -DSGI -static
CCOMPILER_DATA = cc -O1 -64 -mips4 -G 0 -DSGI
lib_other = -lcomplib.sgimath
ARGOSMAC = sgipower
endif
endif
#
# Definitions for target DEC
#
ifeq ($(TARGET),DEC)
ifdef PARALLEL
error1:
@echo No parallel setup for $(TARGET)
exit 1
else
FCOMPILER_DATA = f77 -O5 -fast -DDEC
CCOMPILER_DATA = cc -DDEC
lib_other = -lnag
ARGOSMAC = decalpha
endif
endif
#
# Definitions for target NEW
#
# Add -DPARALLEL -DVAR_MPI to your Fortran and C compiler options when setting up parallel environment !!!
#
ifeq ($(TARGET),NEW)
ifdef PARALLEL
FCOMPILER_DATA =
CCOMPILER_DATA =
FINCLUDE_DIR =
CINCLUDE_DIR =
lib_other =
other_options =
else
FCOMPILER_DATA =
CCOMPILER_DATA =
FINCLUDE_DIR =
CINCLUDE_DIR =
lib_other =
other_options =
ARGOSMAC =
endif
endif
#
# Based on requirements (PARALLEL or SERIAL) set the correct
# - objects
# - include files
# - program binary name and location, and library name
# - name of general library
#
ifdef PARALLEL
objects += $(objects_parallel)
include_files += $(include_parallel)
lib_program = ../../lib/$(TARGET)/$(program).par.a
bin_program = ../../bin/$(TARGET)/$(program).par.x
lib_general = ../../lib/$(TARGET)/general.par.a
else
objects += $(objects_serial)
lib_program = ../../lib/$(TARGET)/$(program).a
bin_program = ../../bin/$(TARGET)/$(program).x
lib_general = ../../lib/$(TARGET)/general.a
endif
FCOMPILER_DATA += $(FINCLUDE_DIR)
CCOMPILER_DATA += $(CINCLUDE_DIR)
#
# Compiling definitions
#
.SUFFIXES : .f .F .c .o
.f.o: $(include_files)
$(FCOMPILER_DATA) -c $*.f
.F.o: $(include_files)
$(FCOMPILER_DATA) -c $*.F
.c.o :
$(CCOMPILER_DATA) -c $*.c