Skip to content

Commit 33258cb

Browse files
Switch to POSIX make variable names
Allows us to use the built-in suffix rules where appropriate. FORTRAN -> FC (POSIX) OPTS -> FFLAGS (POSIX) DRVOPTS -> FFLAGS_DRV NOOPT -> FFLAGS_NOOPT LOADER -> FC (use the compiler driver for linking) LOADOPTS -> LDFLAGS (POSIX) ARCH -> AR (POSIX) ARCHFLAGS -> ARFLAGS (POSIX)
1 parent f4a1592 commit 33258cb

30 files changed

+318
-371
lines changed

BLAS/SRC/Makefile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,23 +138,23 @@ ALLOBJ = $(SBLAS1) $(SBLAS2) $(SBLAS3) $(DBLAS1) $(DBLAS2) $(DBLAS3) \
138138
$(ZBLAS2) $(ZBLAS3) $(ALLBLAS)
139139

140140
$(BLASLIB): $(ALLOBJ)
141-
$(ARCH) $(ARCHFLAGS) $@ $^
141+
$(AR) $(ARFLAGS) $@ $^
142142
$(RANLIB) $@
143143

144144
single: $(SBLAS1) $(ALLBLAS) $(SBLAS2) $(SBLAS3)
145-
$(ARCH) $(ARCHFLAGS) $(BLASLIB) $^
145+
$(AR) $(ARFLAGS) $(BLASLIB) $^
146146
$(RANLIB) $(BLASLIB)
147147

148148
double: $(DBLAS1) $(ALLBLAS) $(DBLAS2) $(DBLAS3)
149-
$(ARCH) $(ARCHFLAGS) $(BLASLIB) $^
149+
$(AR) $(ARFLAGS) $(BLASLIB) $^
150150
$(RANLIB) $(BLASLIB)
151151

152152
complex: $(CBLAS1) $(CB1AUX) $(ALLBLAS) $(CBLAS2) $(CBLAS3)
153-
$(ARCH) $(ARCHFLAGS) $(BLASLIB) $^
153+
$(AR) $(ARFLAGS) $(BLASLIB) $^
154154
$(RANLIB) $(BLASLIB)
155155

156156
complex16: $(ZBLAS1) $(ZB1AUX) $(ALLBLAS) $(ZBLAS2) $(ZBLAS3)
157-
$(ARCH) $(ARCHFLAGS) $(BLASLIB) $^
157+
$(AR) $(ARFLAGS) $(BLASLIB) $^
158158
$(RANLIB) $(BLASLIB)
159159

160160
FRC:
@@ -165,6 +165,3 @@ cleanobj:
165165
rm -f *.o
166166
cleanlib:
167167
#rm -f $(BLASLIB) # May point to a system lib, e.g. -lblas
168-
169-
.f.o:
170-
$(FORTRAN) $(OPTS) -c -o $@ $<

BLAS/TESTING/Makefile

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,31 @@ complex: xblat1c xblat2c xblat3c
77
complex16: xblat1z xblat2z xblat3z
88

99
xblat1s: sblat1.o $(BLASLIB)
10-
$(LOADER) $(LOADOPTS) -o $@ $^
10+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
1111
xblat1d: dblat1.o $(BLASLIB)
12-
$(LOADER) $(LOADOPTS) -o $@ $^
12+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
1313
xblat1c: cblat1.o $(BLASLIB)
14-
$(LOADER) $(LOADOPTS) -o $@ $^
14+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
1515
xblat1z: zblat1.o $(BLASLIB)
16-
$(LOADER) $(LOADOPTS) -o $@ $^
16+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
1717

1818
xblat2s: sblat2.o $(BLASLIB)
19-
$(LOADER) $(LOADOPTS) -o $@ $^
19+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
2020
xblat2d: dblat2.o $(BLASLIB)
21-
$(LOADER) $(LOADOPTS) -o $@ $^
21+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
2222
xblat2c: cblat2.o $(BLASLIB)
23-
$(LOADER) $(LOADOPTS) -o $@ $^
23+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
2424
xblat2z: zblat2.o $(BLASLIB)
25-
$(LOADER) $(LOADOPTS) -o $@ $^
25+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
2626

2727
xblat3s: sblat3.o $(BLASLIB)
28-
$(LOADER) $(LOADOPTS) -o $@ $^
28+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
2929
xblat3d: dblat3.o $(BLASLIB)
30-
$(LOADER) $(LOADOPTS) -o $@ $^
30+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
3131
xblat3c: cblat3.o $(BLASLIB)
32-
$(LOADER) $(LOADOPTS) -o $@ $^
32+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
3333
xblat3z: zblat3.o $(BLASLIB)
34-
$(LOADER) $(LOADOPTS) -o $@ $^
34+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
3535

3636
run: all
3737
./xblat1s > sblat1.out
@@ -54,6 +54,3 @@ cleanexe:
5454
rm -f xblat*
5555
cleantest:
5656
rm -f *.out core
57-
58-
.f.o:
59-
$(FORTRAN) $(OPTS) -c -o $@ $<

CBLAS/examples/Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
include ../../make.inc
22

3+
.SUFFIXES: .c .o
4+
.c.o:
5+
$(CC) $(CFLAGS) -I../include -c -o $@ $<
6+
37
all: cblas_ex1 cblas_ex2
48

59
cblas_ex1: cblas_example1.o $(CBLASLIB) $(BLASLIB)
6-
$(LOADER) $(LOADOPTS) -o $@ $^
10+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
711
cblas_ex2: cblas_example2.o $(CBLASLIB) $(BLASLIB)
8-
$(LOADER) $(LOADOPTS) -o $@ $^
12+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
913

1014
clean: cleanobj cleanexe
1115
cleanobj:
1216
rm -f *.o
1317
cleanexe:
1418
rm -f cblas_ex1 cblas_ex2
15-
16-
.c.o:
17-
$(CC) $(CFLAGS) -I../include -c -o $@ $<

CBLAS/src/Makefile

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
include ../../make.inc
44

5+
.SUFFIXES: .c .o
6+
.c.o:
7+
$(CC) $(CFLAGS) -I../include -c -o $@ $<
8+
59
all: $(CBLASLIB)
610

711
# Error handling routines for level 2 & 3
@@ -45,22 +49,22 @@ sclev1 = cblas_scasum.o scasumsub.o cblas_scnrm2.o scnrm2sub.o
4549

4650
# Single precision real
4751
slib1: $(slev1) $(sclev1)
48-
$(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
52+
$(AR) $(ARFLAGS) $(CBLASLIB) $^
4953
$(RANLIB) $(CBLASLIB)
5054

5155
# Double precision real
5256
dlib1: $(dlev1)
53-
$(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
57+
$(AR) $(ARFLAGS) $(CBLASLIB) $^
5458
$(RANLIB) $(CBLASLIB)
5559

5660
# Single precision complex
5761
clib1: $(clev1) $(sclev1)
58-
$(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
62+
$(AR) $(ARFLAGS) $(CBLASLIB) $^
5963
$(RANLIB) $(CBLASLIB)
6064

6165
# Double precision complex
6266
zlib1: $(zlev1)
63-
$(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
67+
$(AR) $(ARFLAGS) $(CBLASLIB) $^
6468
$(RANLIB) $(CBLASLIB)
6569

6670
#
@@ -97,22 +101,22 @@ zlev2 = cblas_zgemv.o cblas_zgbmv.o cblas_zhemv.o cblas_zhbmv.o cblas_zhpmv.o \
97101

98102
# Single precision real
99103
slib2: $(slev2) $(errhand)
100-
$(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
104+
$(AR) $(ARFLAGS) $(CBLASLIB) $^
101105
$(RANLIB) $(CBLASLIB)
102106

103107
# Double precision real
104108
dlib2: $(dlev2) $(errhand)
105-
$(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
109+
$(AR) $(ARFLAGS) $(CBLASLIB) $^
106110
$(RANLIB) $(CBLASLIB)
107111

108112
# Single precision complex
109113
clib2: $(clev2) $(errhand)
110-
$(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
114+
$(AR) $(ARFLAGS) $(CBLASLIB) $^
111115
$(RANLIB) $(CBLASLIB)
112116

113117
# Double precision complex
114118
zlib2: $(zlev2) $(errhand)
115-
$(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
119+
$(AR) $(ARFLAGS) $(CBLASLIB) $^
116120
$(RANLIB) $(CBLASLIB)
117121

118122
#
@@ -143,22 +147,22 @@ zlev3 = cblas_zgemm.o cblas_zsymm.o cblas_zhemm.o cblas_zherk.o \
143147

144148
# Single precision real
145149
slib3: $(slev3) $(errhand)
146-
$(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
150+
$(AR) $(ARFLAGS) $(CBLASLIB) $^
147151
$(RANLIB) $(CBLASLIB)
148152

149153
# Double precision real
150154
dlib3: $(dlev3) $(errhand)
151-
$(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
155+
$(AR) $(ARFLAGS) $(CBLASLIB) $^
152156
$(RANLIB) $(CBLASLIB)
153157

154158
# Single precision complex
155159
clib3: $(clev3) $(errhand)
156-
$(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
160+
$(AR) $(ARFLAGS) $(CBLASLIB) $^
157161
$(RANLIB) $(CBLASLIB)
158162

159163
# Double precision complex
160164
zlib3: $(zlev3) $(errhand)
161-
$(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
165+
$(AR) $(ARFLAGS) $(CBLASLIB) $^
162166
$(RANLIB) $(CBLASLIB)
163167

164168

@@ -168,22 +172,22 @@ alev3 = $(slev3) $(dlev3) $(clev3) $(zlev3)
168172

169173
# All level 1
170174
all1: $(alev1)
171-
$(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
175+
$(AR) $(ARFLAGS) $(CBLASLIB) $^
172176
$(RANLIB) $(CBLASLIB)
173177

174178
# All level 2
175179
all2: $(alev2) $(errhand)
176-
$(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
180+
$(AR) $(ARFLAGS) $(CBLASLIB) $^
177181
$(RANLIB) $(CBLASLIB)
178182

179183
# All level 3
180184
all3: $(alev3) $(errhand)
181-
$(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
185+
$(AR) $(ARFLAGS) $(CBLASLIB) $^
182186
$(RANLIB) $(CBLASLIB)
183187

184188
# All levels and precisions
185189
$(CBLASLIB): $(alev1) $(alev2) $(alev3) $(errhand)
186-
$(ARCH) $(ARCHFLAGS) $@ $^
190+
$(AR) $(ARFLAGS) $@ $^
187191
$(RANLIB) $@
188192

189193
FRC:
@@ -194,8 +198,3 @@ cleanobj:
194198
rm -f *.o
195199
cleanlib:
196200
rm -f $(CBLASLIB)
197-
198-
.c.o:
199-
$(CC) $(CFLAGS) -I../include -c -o $@ $<
200-
.f.o:
201-
$(FORTRAN) $(OPTS) -c -o $@ $<

CBLAS/testing/Makefile

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
include ../../make.inc
66

7+
.SUFFIXES: .c .o
8+
.c.o:
9+
$(CC) $(CFLAGS) -I../include -c -o $@ $<
10+
711
# Archive files necessary to compile
812
LIB = $(CBLASLIB) $(BLASLIB)
913

@@ -38,34 +42,34 @@ all3: xscblat3 xdcblat3 xccblat3 xzcblat3
3842

3943
# Single real
4044
xscblat1: c_sblat1.o $(stestl1o) $(LIB)
41-
$(LOADER) $(LOADOPTS) -o $@ $^
45+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
4246
xscblat2: c_sblat2.o $(stestl2o) $(LIB)
43-
$(LOADER) $(LOADOPTS) -o $@ $^
47+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
4448
xscblat3: c_sblat3.o $(stestl3o) $(LIB)
45-
$(LOADER) $(LOADOPTS) -o $@ $^
49+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
4650
# Double real
4751
xdcblat1: c_dblat1.o $(dtestl1o) $(LIB)
48-
$(LOADER) $(LOADOPTS) -o $@ $^
52+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
4953
xdcblat2: c_dblat2.o $(dtestl2o) $(LIB)
50-
$(LOADER) $(LOADOPTS) -o $@ $^
54+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
5155
xdcblat3: c_dblat3.o $(dtestl3o) $(LIB)
52-
$(LOADER) $(LOADOPTS) -o $@ $^
56+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
5357

5458
# Single complex
5559
xccblat1: c_cblat1.o $(ctestl1o) $(LIB)
56-
$(LOADER) $(LOADOPTS) -o $@ $^
60+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
5761
xccblat2: c_cblat2.o $(ctestl2o) $(LIB)
58-
$(LOADER) $(LOADOPTS) -o $@ $^
62+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
5963
xccblat3: c_cblat3.o $(ctestl3o) $(LIB)
60-
$(LOADER) $(LOADOPTS) -o $@ $^
64+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
6165

6266
# Double complex
6367
xzcblat1: c_zblat1.o $(ztestl1o) $(LIB)
64-
$(LOADER) $(LOADOPTS) -o $@ $^
68+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
6569
xzcblat2: c_zblat2.o $(ztestl2o) $(LIB)
66-
$(LOADER) $(LOADOPTS) -o $@ $^
70+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
6771
xzcblat3: c_zblat3.o $(ztestl3o) $(LIB)
68-
$(LOADER) $(LOADOPTS) -o $@ $^
72+
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
6973

7074

7175
# RUN TESTS
@@ -102,9 +106,3 @@ cleanexe:
102106
rm -f x*
103107
cleantest:
104108
rm -f *.out core
105-
106-
.SUFFIXES: .o .f .c
107-
.c.o:
108-
$(CC) $(CFLAGS) -I../include -c -o $@ $<
109-
.f.o:
110-
$(FORTRAN) $(OPTS) -c -o $@ $<

DOCS/lawn81.tex

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -444,10 +444,10 @@ \subsection{Copy and edit the file \texttt{LAPACK/make.inc.example to LAPACK/mak
444444
library names, to specify the architecture to which you are installing
445445
LAPACK. This features avoids confusion in library names when you are
446446
installing LAPACK on more than one architecture. Next, you will need
447-
to modify \texttt{FORTRAN}, \texttt{OPTS}, \texttt{DRVOPTS}, \texttt{NOOPT}, \texttt{LOADER},
448-
and \texttt{LOADOPTS} to specify
447+
to modify \texttt{FC}, \texttt{FFLAGS}, \texttt{FFLAGS\_DRV}, \texttt{FFLAGS\_NOOPT},
448+
and \texttt{LDFLAGS} to specify
449449
the compiler, compiler options, compiler options for the testing and
450-
timing\footnotemark[\value{footnote}] main programs, loader, loader options.
450+
timing\footnotemark[\value{footnote}] main programs, and linker options.
451451
Next you will have to choose which function you will use to time in the \texttt{SECOND} and \texttt{DSECND} routines.
452452
\begin{verbatim}
453453
#The Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
@@ -466,7 +466,7 @@ \subsection{Copy and edit the file \texttt{LAPACK/make.inc.example to LAPACK/mak
466466
Refer to the section~\ref{second} to get more information.
467467

468468

469-
Next, you will need to modify \texttt{ARCH}, \texttt{ARCHFLAGS}, and \texttt{RANLIB} to specify archiver,
469+
Next, you will need to modify \texttt{AR}, \texttt{ARFLAGS}, and \texttt{RANLIB} to specify archiver,
470470
archiver options, and ranlib for your machine. If your architecture
471471
does not require \texttt{ranlib} to be run after each archive command (as
472472
is the case with CRAY computers running UNICOS, Hewlett Packard
@@ -723,7 +723,7 @@ \subsubsection{Installing SECOND and DSECND}\label{second}
723723
\item If ETIME is available as an external function, set the value of the TIMER variable in your
724724
make.inc to \texttt{EXT\_ETIME}:\texttt{second\_EXT\_ETIME.f} and \texttt{dsecnd\_EXT\_ETIME.f} will be used.
725725
Usually on HPPA architectures,
726-
the compiler and loader flag \texttt{+U77} should be included to access
726+
the compiler and linker flag \texttt{+U77} should be included to access
727727
the function \texttt{ETIME}.
728728

729729
\item If ETIME\_ is available as an external function, set the value of the TIMER variable in your make.inc
@@ -1389,7 +1389,7 @@ \section{\texttt{LAPACK/make.inc}}
13891389
\section{ETIME}
13901390

13911391
On HPPA architectures,
1392-
the compiler and loader flag \texttt{+U77} should be included to access
1392+
the compiler and linker flag \texttt{+U77} should be included to access
13931393
the function \texttt{ETIME}.
13941394

13951395
\section{ILAENV and IEEE-754 compliance}
@@ -1494,13 +1494,13 @@ \section{Compiling testing/timing drivers}
14941494
to be allocated statically.
14951495

14961496
On HPPA architectures, the
1497-
compiler and loader flag \texttt{-K} should be used when compiling these testing
1497+
compiler and linker flag \texttt{-K} should be used when compiling these testing
14981498
and timing main programs to avoid such a stack overflow. I.e., set
1499-
\texttt{DRVOPTS = -K} in the \texttt{LAPACK/make.inc} file.
1499+
\texttt{FFLAGS\_DRV = -K} in the \texttt{LAPACK/make.inc} file.
15001500

15011501
For similar reasons,
1502-
on SGI architectures, the compiler and loader flag \texttt{-static} should be
1503-
used. I.e., set \texttt{DRVOPTS = -static} in the \texttt{LAPACK/make.inc} file.
1502+
on SGI architectures, the compiler and linker flag \texttt{-static} should be
1503+
used. I.e., set \texttt{FFLAGS\_DRV = -static} in the \texttt{LAPACK/make.inc} file.
15041504

15051505
\section{IEEE arithmetic}
15061506

0 commit comments

Comments
 (0)