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