Add NO_STATIC variable which disables static lib installation
authorTimothy Gu <timothygu99@gmail.com>
Fri, 23 May 2014 01:05:19 +0000 (18:05 -0700)
committerTimothy Gu <timothygu99@gmail.com>
Fri, 23 May 2014 01:06:26 +0000 (18:06 -0700)
Static library is still built for shared lib generation.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Makefile
Makefile.install
Makefile.rule

index 343bd72..66d0947 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -129,6 +129,11 @@ endif
 ifeq ($(NOFORTRAN), 1)
        $(error OpenBLAS: Detecting fortran compiler failed. Please install fortran compiler, e.g. gfortran, ifort, openf90.)
 endif
+ifeq ($(NO_STATIC), 1)
+ifeq ($(NO_SHARED), 1)
+       $(error OpenBLAS: neither static nor shared are enabled.)
+endif
+endif
        @-ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
        @for d in $(SUBDIRS) ; \
        do if test -d $$d; then \
index d40bdd4..e041120 100644 (file)
@@ -50,10 +50,12 @@ ifndef NO_LAPACKE
 endif
 
 #for install static library 
+ifndef NO_STATIC
        @echo Copying the static library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
        @install -pm644 $(LIBNAME) $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
        @cd $(DESTDIR)$(OPENBLAS_LIBRARY_DIR) ; \
        ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
+endif
 #for install shared library 
 ifndef NO_SHARED
        @echo Copying the shared library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
index 6b604b7..cf631d8 100644 (file)
@@ -48,6 +48,9 @@ VERSION = 0.2.9.rc2
 # automatically detected by the the script.
 # NUM_THREADS = 24
 
+# if you don't need to install the static library, please comment it in.
+# NO_STATIC = 1
+
 # if you don't need generate the shared library, please comment it in.
 # NO_SHARED = 1