-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.pre-autoconf
307 lines (232 loc) · 7.79 KB
/
Makefile.pre-autoconf
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
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
#
# Makefile to build AutoGrid from Object files.
#
# $Revision: 1.2 $
#
# (c) 1994-2005, TSRI
# Garrett M. Morris, Ruth Huey, David S. Goodsell
#
#
# $Id: Makefile.pre-autoconf,v 1.2 2008/06/26 22:54:57 garrett Exp $
#
EXE = .
OBJS = main.o \
check_size.o \
setflags.o \
timesys.o \
timesyshms.o \
printhms.o \
prHMSfixed.o \
printdate.o \
strindex.o \
banner.o \
gpfparser.o \
parsetypes.o \
atom_parameter_manager.o \
read_parameter_library.o \
parse_param_line.o \
distdepdiel.o
LNS = \
main.ln \
check_size.ln \
setflags.ln \
timesyshms.ln \
timesys.ln \
printhms.ln \
prHMSfixed.ln \
printdate.ln \
banner.ln \
gpfparser.ln \
parsetypes.ln \
strindex.ln \
atom_parameter_manager.ln\
read_parameter_library.ln \
parse_param_line.ln \
distdepdiel.ln
CC = g++
# CC = cc # SGI, Sun, MacOS X
# CC = cxx # Alpha.
# CC = gcc # use this if you have the Gnu compiler, as on Linux, MkLinux, LinuxPPC systems.
LIB = -lm # SGI, Sun, Linux, MacOS X
# LIB = -lm -lc # Alpha, Convex.
# LIB = -lm -lg++ # HP, Gnu.
CFLAGS = $(DBUG) $(OPT) -I../autodock $(WARN) $(PROF) # SGI, HP, Alpha, Sun, Convex, Linux, MacOS X
OLIMIT = # SGI, Convex, Linux, MacOS X, -g debugging
# OLIMIT = -Olimit 2048 # Sun, Hewlett-Packard, DEC Alpha
OPTLEVEL = -O3 # Agressive optimization.
# OPTLEVEL = -O2 # High optimization.
# OPTLEVEL = -O1 # Do optimizations that can be done quickly;default.
# OPTLEVEL = -O0 # Do not optimize.
OPT_SGI_IPNUM = # Alpha, HP, Sun, Convex, SGI, Linux, MacOS X.
# OPT_SGI_IPNUM = -Ofast=ip19 # SGI, 'uname -a' says 'IP19'
# OPT_SGI_IPNUM = -Ofast=ip21 # SGI, 'uname -a' says 'IP21'
# OPT_SGI_IPNUM = -Ofast=ip25 # SGI, 'uname -a' says 'IP25' PowerChallenge is R10000, IP25
# OPT_SGI_IPNUM = -Ofast=ip27 # SGI, 'uname -a' says 'IP27' Atlas Cluster is R12000, IP27
# OPT_SGI_IPNUM = -Ofast=ip30 # SGI, 'uname -a' says 'IP30'
OPT_SGI_R000 = # Alpha, HP, Sun, Convex, SGI, Linux, MacOS X.
# OPT_SGI_R000 = -r4000 -mips2 # SGI, 'hinv' says MIPS Processor is R4000
# OPT_SGI_R000 = -r8000 -mips4 # SGI, 'hinv' says MIPS Processor is R8000
# OPT_SGI_R000 = -r10000 -mips4 # SGI, 'hinv' says MIPS Processor is R10000
# OPT_SGI_R000 = -r12000 -mips4 # SGI, 'hinv' says MIPS Processor is R12000
# OPT_SGI_R000 = -r14000 -mips4 # SGI, 'hinv' says MIPS Processor is R14000
OPT_ARCH_SPECIFIC = # Alpha, HP, Sun, Convex, SGI, Linux, MacOS X.
# OPT_ARCH_SPECIFIC = -n32 $(OPT_SGI_IPNUM) $(OPT_SGI_R000) -IPA $(LNO_OPT) # SGI, new 32-bit
# OPT_ARCH_SPECIFIC = -n32 $(OPT_SGI_IPNUM) $(OPT_SGI_R000) -IPA $(LNO_OPT) -DUSE_INT_AS_LONG # SGI (long is 8bytes).
# OPT_ARCH_SPECIFIC = $(OPT_SGI_IPNUM) $(OPT_SGI_R000) $(LNO_OPT) # SGI, not new 32-bit
# OPT_ARCH_SPECIFIC = -ifo # DEC Alpha
# OPT_ARCH_SPECIFIC = -O +O3 +Obb2048 # Hewlett-Packard
# OPT_ARCH_SPECIFIC = -ur # Convex
# OPT_ARCH_SPECIFIC = -g # debugging
# OPT_ARCH_SPECIFIC = # Mac OS X
OPT = $(OPTLEVEL) $(OPT_ARCH_SPECIFIC) # All platforms
LINKOPT = $(OPT) # SGI, HP, Alpha, Sun, Convex, Linux, Darwin, Mac OS X
# LINKOPT = -O2 -r4000 -IPA $(LNO_OPT) # SGI/IRIX5: R4000.
# LINKOPT = $(CSTD) $(OPT) -Wl,--stack=0x2000000 # Cygwin, 32MB stacksize
LINK = $(LINKOPT) # Linking flags.
# LINK = $(LINKOPT) -cord # Procedure rearranger on SGI.
LNO_OPT = # SGI, no special optimization at link time
# LNO_OPT = -LNO:auto_dist=ON:gather_scatter=2 # SGI
LINT = lint # C code checking
LINTFLAGS = $(LIB) -lansi -c # DEC-Alpha # MA
# LINTFLAGS = -DHPPA -D_HPUX_SOURCE -Aa $(LIB) -c # HP/Hewlett-Packard
# LINTFLAGS = -Aa $(LIB) -c # HP/Hewlett-Packard Alt
# LINTFLAGS = $(LIB) -n -lansic # Sun Sparc
DBUG = -DNDEBUG # No debugging and no assert code.
# DBUG = # Use assert code.
# DBUG = -g # dbx.
# DBUG = -g -DDEBUG # dbx + DEBUG-specific code.
# DBUG = -g3 # dbx + optimization.
# DBUG = -g3 -DDEBUG # dbx + optimization, + DEBUG-specific code.
# DBUG = -DDEBUG # Just DEBUG-specific code.
# DBUG = -DDEBUG2 # Just DEBUG2-specific code for tracking prop.selection.
# DBUG = -DDEBUG3 # Just DEBUG3-specific code for print age of individuals.
PROF = # No profiling.
# PROF = -p # Profiling.
WARN = # Default warning level.
# WARN = -woff all # For no warnings.
# WARN = -fullwarn -ansiE -ansiW # For full warnings during compilation.
%.o : %.cpp
$(CC) -c $(CFLAGS) $< -o $@
autogrid4 : $(OBJS)
@echo $(EXE) on `date` using' >>> ' `hostname` ' <<<' >> LATEST_MAKE
@echo 'Flags: '$(CC) $(LINK) $(LIB) >> LATEST_MAKE
$(CC) $(LINK) -o $@ $(OBJS) $(LIB)
check : test
test : autogrid4 Tests/test_autogrid4.py
@echo " "
@echo "Running the unit tests on autogrid4"
@echo " "
cd Tests; python test_autogrid4.py; cd ..
convertmap : convertmap.o
$(CC) $(OPT) -o $@ convertmap.o $(LIB)
main.o : main.cpp autogrid.h autoglobal.h banner.cpp gpfparser.cpp gpftoken.h parsetypes.cpp default_parameters.h read_parameter_library.cpp read_parameter_library.h ../autodock/autocomm.h
check_size.o : check_size.cpp autogrid.h
setflags.o : setflags.cpp autogrid.h
timesyshms.o : timesyshms.cpp autogrid.h
timesys.o : timesys.cpp autogrid.h
printhms.o : printhms.cpp autogrid.h
prHMSfixed.o : prHMSfixed.cpp autogrid.h
printdate.o : printdate.cpp autogrid.h
banner.o : banner.cpp autogrid.h
gpfparser.o : gpfparser.cpp autogrid.h gpftoken.h
parsetypes.o : parsetypes.cpp autogrid.h
strindex.o : strindex.cpp autogrid.h
convertmap.o : convertmap.cpp
atom_parameter_manager.o : atom_parameter_manager.cpp parameters.h
read_parameter_library.o : read_parameter_library.cpp default_parameters.h partokens.h ../autodock/autocomm.h
parse_param_line.o : parse_param_line.cpp parse_param_line.h partokens.h
distdepdiel.o : distdepdiel.cpp distdepdiel.h
default_parameters.h : ../autodock/paramdat2h.csh ../autodock/AD4.1_bound.dat
rm -f $@
./paramdat2h.csh > tmp-paramdat
mv -f tmp-paramdat $@
#
# lcheck dependencies...
#
main.ln : main.cpp autogrid.h autoglobal.h
$(LINT) $(LINTFLAGS) $?
check_size.ln : check_size.cpp autogrid.h
$(LINT) $(LINTFLAGS) $?
setflags.ln : setflags.cpp autogrid.h
$(LINT) $(LINTFLAGS) $?
timesyshms.ln : timesyshms.cpp autogrid.h
$(LINT) $(LINTFLAGS) $?
timesys.ln : timesys.cpp autogrid.h
$(LINT) $(LINTFLAGS) $?
printhms.ln : printhms.cpp autogrid.h
$(LINT) $(LINTFLAGS) $?
prHMSfixed.ln : prHMSfixed.cpp autogrid.h
$(LINT) $(LINTFLAGS) $?
printdate.ln : printdate.cpp autogrid.h
$(LINT) $(LINTFLAGS) $?
banner.ln : banner.cpp autogrid.h
$(LINT) $(LINTFLAGS) $?
gpfparser.ln : gpfparser.cpp autogrid.h gpftoken.h
$(LINT) $(LINTFLAGS) $?
parsetypes.ln : parsetypes.cpp autogrid.h
$(LINT) $(LINTFLAGS) $?
strindex.ln : strindex.cpp autogrid.h
$(LINT) $(LINTFLAGS) $?
atom_parameter_manager.ln : atom_parameter_manager.cpp parameters.h
$(LINT) $(LINTFLAGS) $?
distdepdiel.ln : distdepdiel.cpp distdepdiel.h
$(LINT) $(LINTFLAGS) $?
#
# Remove objects, lint files, cores, etc.
#
clean:
/bin/rm -rf *.o *.s *.ln a.out core autogrid4 convertmap
#
# DEC Alpha
#
openalpha :
/bin/cp -f obj.alpha/*.o .
/bin/cp -f obj.alpha/*.ln .
closealpha :
/bin/mv -f *.o obj.alpha
/bin/mv -f *.ln obj.alpha
#
# Convex
#
openc2 :
/bin/cp -f obj.c2/*.o .
/bin/cp -f obj.c2/*.ln .
closec2 :
/bin/mv -f *.o obj.c2
/bin/mv -f *.ln obj.c2
#
# Hewlett-Packard Precision Architecture
#
openhppa :
/bin/cp -f obj.hppa/*.o .
/bin/cp -f obj.hppa/*.ln .
closehppa :
/bin/mv -f *.o obj.hppa
/bin/mv -f *.ln obj.hppa
#
# Silicon Graphics
#
opensgi4D :
/bin/cp -f obj.sgi4D/*.o .
/bin/cp -f obj.sgi4D/*.ln .
closesgi4D :
/bin/mv -f *.o obj.sgi4D
/bin/mv -f *.ln obj.sgi4D
#
# Sun
#
opensun4 :
/bin/cp -f obj.sun4/*.o .
/bin/cp -f obj.sun4/*.ln .
closesun4 :
/bin/mv -f *.o obj.sun4
/bin/mv -f *.ln obj.sun4
#
# Architecture
#
openxxx :
/bin/cp -f obj.xxx/*.o .
/bin/cp -f obj.xxx/*.ln .
closexxx :
/bin/mv -f *.o obj.xxx
/bin/mv -f *.ln obj.xxx