-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
260 lines (241 loc) · 7.49 KB
/
Copy pathMakefile
File metadata and controls
260 lines (241 loc) · 7.49 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
#
# Makefile for BGAOL
#
# Herbert J. Bernstein, Bernstein + Sons
# Lawrence C. Andrews, Micro Encoder Inc.
#
# 1 July 2012
# Rev 5 November 2012
#
# Modify the following definitions for your system
#
# HTTPDSERVER is the name of the server on which the
# installation is being made
#
# *************************************************
# *** YOU MUST CHANGE THIS DEFINITION TO PERMIT ***
# *** REMOTE ACCESS ***
# *************************************************
#
HTTPDSERVER ?= HOST.DOMAIN/~$(USER)
#
# SEARCHURL IS THE URL FOR NEW SEARCH
#
SEARCHURL ?= http://$(HTTPDSERVER)/bgaol#search
#
# BINDEST is the installation directory for the executable
# of bgaol
BINDEST ?= $(HOME)/bin
#
# CGIBIN is the installation directory for the cgi-bin script
# iterate.csh
CGIBIN ?= $(HOME)/public_html/cgi-bin
#
# CGIBINEXT is the external name of the directory for the
# cgi-bin script bgaol.csh
CGIBINEXT ?= /cgi-bin
#
# CGIMETHOD is either GET or POST
#
CGIMETHOD ?= POST
#
# HTDOCS is the installation directory for the HTML document
# bgaol.html
HTDOCS ?= $(HOME)/public_html/bgaol
#
# HTDOCSEXT is the external name of the directory for the
# HTML document bgaol.html
HTDOCSEXT ?= /bgaol
#
#
# Default compile flag definition to select debug mode under unix
#FFLAGS = -g
FFLAGS ?= -O3
FC ?= gfortran
#
# For IBM AIX xlf compilation with full optimization try this
#FFLAGS = -O3 -qstrict
#FC = xlf
#
#
#
#
# You should not have to edit below this line
#********************************************************************
#
#
# mathscribe is used by the web page to set formulae
#
MATHSCRIBEVERSION ?= 0.2.0
MATHSCRIBEPATH ?= mathscribe-$(MATHSCRIBEVERSION)
MATHSCRIBETARBALL ?= $(MATHSCRIBEPATH).tar.gz
MATHSCRIBETARBALLURL ?= http://downloads.sf.net/iterate/$(MATHSCRIBETARBALL)
MATHSCRIBEURL = http://$(HTTPDSERVER)$(HTDOCSEXT)/$(MATHSCRIBEPATH)
#
# BGAOL URLS
#
BGAOLVERSION = 1.1
BGAOLTARBALLURL = http://downloads.sf.net/iterate/bgaol-$(BGAOLVERSION).tar.gz
BGAOLZIPURL = http://downloads.sf.net/iterate/bgaol-$(BGAOLVERSION).zip
CGIPATH ?= http://$(HTTPDSERVER)$(CGIBINEXT)
BINPATH ?= $(BINDEST)/bgaol
HTFLAGS = -DCGIBIN=$(CGIPATH) \
-DHTTPDSERVER=$(HTTPDSERVER) \
-DMATHSCRIBEURL=$(MATHSCRIBEURL) \
-DBGAOLTARBALLURL=$(BGAOLTARBALLURL) \
-DBGAOLZIPURL=$(BGAOLZIPURL) \
-DCGIMETHOD=$(CGIMETHOD) \
-DHTDOCS=$(HTDOCS)
#
#
edit:
@/bin/echo "**************************************"
@/bin/echo "* You must edit Makefile before *"
@/bin/echo "* installing BGAOL *"
@/bin/echo "**************************************"
@/bin/echo "You must define the following in Makefile"
@/bin/echo "or as environment variables:"
@/bin/echo ""
@/bin/echo "HTTPDSERVER ---- currently:" $(HTTPDSERVER)
@/bin/echo "SEARCHURL ------ currently:" $(SEARCHURL)
@/bin/echo "BINDEST -------- currently:" $(BINDEST)
@/bin/echo "HTDOCS -------- currently:" $(HTDOCS)
@/bin/echo "CGIPATH ------- currently:" $(CGIPATH)
@/bin/echo "CGIMETHOD ------ currently:" $(CGIMETHOD)
@/bin/echo "FC ------------ currently:" $(FC)
@/bin/echo "FFLAGS -------- currently:" $(FFLAGS)
@/bin/echo ""
@/bin/echo "**************************************"
@/bin/echo "* Then: *"
@/bin/echo "* make edit_done *"
@/bin/echo "* make install *"
@/bin/echo "**************************************"
#
edit_done: bgaol bgaol.html bgaol.csh
touch edit
#
clean:
-@rm -f edit
-@rm -f bgaol.html
-@rm -f bgaol
-@rm -f *.o
-@rm -f bgaol.csh
-@rm -f *.bak
-@rm -f follower/*,o
-@rm -f follower/Follower
-@rm -f follower/F_LargeNCDIST.txt
-@rm -f follower/F_Summary.diff
-@rm -f follower/F_Summary.txt
-@rm -f follower/F_Step.txt
-@rm -f follower/F_Step_\&_NCDIST.txt
-@rm -f follower/Follower.diff
-@rm -f follower/Follower.out
-@rm -f follower/randTest
-@rm -f follower/randTest.diff
-@rm -f follower/randTest.out
-@rm -f follower/fort.*
-@rm -f follower/RHRAND.o
-@rm -f testcases/BGAOL_tests*_cur
-@rm -f testcases/bgaol_tests.diff
#
bgaol.html: bgaol.html.m4 Makefile $(MATHSCRIBEPATH)
m4 -d $(HTFLAGS) < bgaol.html.m4 > bgaol.html
#
bgaol.csh: bgaol.csh.m4 Makefile
m4 -DSEARCHURL=$(SEARCHURL) \
-DBINPATH=$(BINPATH) \
-DSEARCHURL=$(SEARCHURL)\
-DCGIMETHOD=$(CGIMETHOD)\
-DHTDOCS=$(HTDOCS)\
< bgaol.csh.m4 > bgaol.csh
#
install: edit_done bgaol bgaol.csh follower/Follower bgaol.html \
$(MATHSCRIBEPATH)
-mkdir -p $(BINDEST)
-mkdir -p $(CGIBIN)
-mkdir -p $(HTDOCS)
chmod 755 bgaol
chmod 755 bgaol.csh
cp bgaol $(BINDEST)
chmod 755 follower/Follower
cp follower/Follower $(BINDEST)
cp bgaol.csh $(CGIBIN)
chmod 755 $(CGIBIN)/bgaol.csh
cp bgaol.html $(HTDOCS)
ln -f -s $(HTDOCS)/bgaol.html $(HTDOCS)/index.html
cp -r $(MATHSCRIBEPATH) $(HTDOCS)/$(MATHSCRIBEPATH)
#
bgaol.o: bgaol.f MKGAOL.FOR MKREFL.FOR E3TOG6.FOR near6.for NEAR.FOR
bgaol: bgaol.o
$(FC) $(FFLAGS) -o bgaol bgaol.o
bgaol.f: BGAOL.FOR
ln -s -f BGAOL.FOR bgaol.f
follower/RHRAND.o: follower/RHRAND.for
(cd follower; $(FC) -ffloat-store $(FFLAGS) -c RHRAND.for)
follower/Follower: follower/Follower.for follower/RHRAND.o follower/MKREFL.FOR NEAR.FOR E3TOG6.FOR MKGAOL.FOR
(cd follower; $(FC) $(FFLAGS) -o Follower Follower.for RHRAND.o)
follower/randTest: follower/randTest.for follower/RHRAND.o
(cd follower; $(FC) $(FFLAGS) -o randTest randTest.for RHRAND.o)
follower/randTest.diff: follower/randTest follower/randTest_orig.out
(cd follower; ./randTest > randTest.out; diff -bu randTest.out randTest_orig.out > randTest.diff)
follower/F_Summary.diff: follower/Follower follower/F_Summary_orig.txt
@/bin/echo "Follower run started, please be patient"
-(cd follower; ./Follower >Follower.out; diff -bu F_Summary.txt F_Summary_orig.txt > F_Summary.diff)
testcases/bgaol_tests.diff: bgaol
@/bin/echo "testall.csh started, please be patient"
(cd testcases; /bin/csh ../testall.csh)
tests: follower/randTest.diff follower/F_Summary.diff follower/F_Step_orig.txt follower/Follower_orig.out \
testcases/BGAOL-cF.in \
testcases/bgaol_tests_orig \
testcases/case01.in \
testcases/case02.in \
testcases/case03.in \
testcases/case04.in \
testcases/case05.in \
testcases/case06.in \
testcases/case07.in \
testcases/case08.in \
testcases/case09.in \
testcases/case10.in \
testcases/case11.in \
testcases/case12.in \
testcases/case13.in \
testcases/case14.in \
testcases/case15.in \
testcases/case16.in \
testcases/case17.in \
testcases/case18.in \
testcases/case19.in \
testcases/case20.in \
testcases/case21.in \
testcases/case22.in \
testcases/case23.in \
testcases/case24.in \
testcases/case25.in \
testcases/case26.in \
testcases/case27.in \
testcases/case28.in \
testcases/case29.in \
testcases/case30.in \
testcases/case32.in \
testcases/case33.in \
testcases/case34.in \
testcases/case35.in \
testcases/case36.in \
testcases/case37.in \
testcases/case38.in \
testcases/case39.in \
testcases/case40.in \
testcases/case41.in \
testcases/case42.in \
testcases/case43.in \
testcases/bgaol_tests.diff
(cd follower; cat randTest.diff)
(cd follower; cat F_Summary.diff; diff -bu F_Step.txt F_Step_orig.txt | head -50)
-(cd follower; diff -bu Follower.out Follower_orig.out | head -50 | tail +9)
$(MATHSCRIBETARBALL):
wget http://downloads.sf.net/iterate/$(MATHSCRIBETARBALL)
$(MATHSCRIBEPATH): $(MATHSCRIBETARBALL)
gunzip < $(MATHSCRIBETARBALL) | tar xvf -
chmod -R 755 $(MATHSCRIBEPATH)
touch $(MATHSCRIBEPATH)