From fe858873af90f0faa352684f0fbae03ef7039cb9 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Thu, 22 May 2014 18:05:19 -0700 Subject: [PATCH] Add NO_STATIC variable which disables static lib installation Static library is still built for shared lib generation. Signed-off-by: Timothy Gu --- Makefile | 5 +++++ Makefile.install | 2 ++ Makefile.rule | 3 +++ 3 files changed, 10 insertions(+) diff --git a/Makefile b/Makefile index 343bd72f4..66d094789 100644 --- a/Makefile +++ b/Makefile @@ -128,6 +128,11 @@ ifeq ($(CORE), UNKOWN) 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) ; \ diff --git a/Makefile.install b/Makefile.install index d40bdd402..e04112089 100644 --- a/Makefile.install +++ b/Makefile.install @@ -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) diff --git a/Makefile.rule b/Makefile.rule index 6b604b781..cf631d843 100644 --- a/Makefile.rule +++ b/Makefile.rule @@ -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