summaryrefslogtreecommitdiff
path: root/CBLAS
diff options
context:
space:
mode:
authorKyle Guinn <elyk03@gmail.com>2017-01-22 19:39:13 -0600
committerKyle Guinn <elyk03@gmail.com>2017-01-22 19:39:13 -0600
commit3442a58f55673f74ab93f018f3c012532d45de35 (patch)
tree8329ab4ed76c2ea4e09e6e843db44da0fb9c6c9d /CBLAS
parentbf47acfddcf6f30e338f7fa05de5ac67c2b588ff (diff)
downloadlapack-3442a58f55673f74ab93f018f3c012532d45de35.tar.gz
lapack-3442a58f55673f74ab93f018f3c012532d45de35.tar.bz2
lapack-3442a58f55673f74ab93f018f3c012532d45de35.zip
Avoid rebuilding CBLAS library and examples
Use targets that are actual filenames so that make can determine if the target is already up-to-date. Since $(CBLASLIB) is a relative path, delete it from a Makefile at the right depth.
Diffstat (limited to 'CBLAS')
-rw-r--r--CBLAS/Makefile4
-rw-r--r--CBLAS/examples/Makefile16
-rw-r--r--CBLAS/src/Makefile16
3 files changed, 19 insertions, 17 deletions
diff --git a/CBLAS/Makefile b/CBLAS/Makefile
index 5a398f80..3ba1f717 100644
--- a/CBLAS/Makefile
+++ b/CBLAS/Makefile
@@ -14,8 +14,8 @@ cleanexe:
cd testing && $(MAKE) cleanexe
cleanall: clean cleanexe
- rm -f $(CBLASLIB)
- cd examples && rm -f *.o cblas_ex1 cblas_ex2
+ cd src && $(MAKE) cleanall
+ cd examples && $(MAKE) cleanall
cblas_testing:
cd testing && $(MAKE) all
diff --git a/CBLAS/examples/Makefile b/CBLAS/examples/Makefile
index 1d416a88..ded5ed9a 100644
--- a/CBLAS/examples/Makefile
+++ b/CBLAS/examples/Makefile
@@ -1,14 +1,14 @@
include ../../make.inc
-all: example1 example2
+all: cblas_ex1 cblas_ex2
-example1:
- $(CC) $(CFLAGS) -I../include -c cblas_example1.c
- $(LOADER) $(LOADOPTS) -o cblas_ex1 cblas_example1.o $(CBLASLIB) $(BLASLIB)
-
-example2:
- $(CC) $(CFLAGS) -I../include -c cblas_example2.c
- $(LOADER) $(LOADOPTS) -o cblas_ex2 cblas_example2.o $(CBLASLIB) $(BLASLIB)
+cblas_ex1: cblas_example1.o
+ $(LOADER) $(LOADOPTS) -o $@ cblas_example1.o $(CBLASLIB) $(BLASLIB)
+cblas_ex2: cblas_example2.o
+ $(LOADER) $(LOADOPTS) -o $@ cblas_example2.o $(CBLASLIB) $(BLASLIB)
cleanall:
rm -f *.o cblas_ex1 cblas_ex2
+
+.c.o:
+ $(CC) $(CFLAGS) -I../include -c -o $@ $<
diff --git a/CBLAS/src/Makefile b/CBLAS/src/Makefile
index 1fa91b23..660c620b 100644
--- a/CBLAS/src/Makefile
+++ b/CBLAS/src/Makefile
@@ -2,10 +2,7 @@
include ../../make.inc
-all: cblaslib
-
-clean:
- rm -f *.o a.out core
+all: $(CBLASLIB)
# Error handling routines for level 2 & 3
errhand = cblas_globals.o cblas_xerbla.o xerbla.o
@@ -185,13 +182,18 @@ all3: $(alev3) $(errhand)
$(RANLIB) $(CBLASLIB)
# All levels and precisions
-cblaslib: $(alev1) $(alev2) $(alev3) $(errhand)
- $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(alev1) $(alev2) $(alev3) $(errhand)
- $(RANLIB) $(CBLASLIB)
+$(CBLASLIB): $(alev1) $(alev2) $(alev3) $(errhand)
+ $(ARCH) $(ARCHFLAGS) $@ $(alev1) $(alev2) $(alev3) $(errhand)
+ $(RANLIB) $@
FRC:
@FRC=$(FRC)
+clean:
+ rm -f *.o a.out core
+cleanall:
+ rm -f $(CBLASLIB)
+
.c.o:
$(CC) $(CFLAGS) -I../include -c -o $@ $<