fix default prefix handling in makefiles
authorLars Buitinck <larsmans@gmail.com>
Wed, 28 Aug 2013 15:39:54 +0000 (17:39 +0200)
committerLars Buitinck <larsmans@gmail.com>
Wed, 28 Aug 2013 15:41:31 +0000 (17:41 +0200)
PREFIX wasn't communicated to Makefile.install (where it matters)
by Makefile. The result is that the default PREFIX is empty and
OpenBLAS was being installed in /lib.

Makefile
Makefile.install

index 9583085..2cf5955 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -15,10 +15,6 @@ ifdef SANITY_CHECK
 BLASDIRS += reference
 endif
 
-ifndef PREFIX
-PREFIX = /opt/OpenBLAS
-endif
-
 SUBDIRS        = $(BLASDIRS)
 ifneq ($(NO_LAPACK), 1)
 SUBDIRS        += lapack
index c02fd72..cbe98bc 100644 (file)
@@ -3,6 +3,8 @@ export GOTOBLAS_MAKEFILE = 1
 -include $(TOPDIR)/Makefile.conf_last
 include ./Makefile.system
 
+PREFIX?=/opt/OpenBLAS
+
 OPENBLAS_INCLUDE_DIR:=$(PREFIX)/include
 OPENBLAS_LIBRARY_DIR:=$(PREFIX)/lib
 OPENBLAS_BUILD_DIR:=$(CURDIR)