Browse Source

Add NO_STATIC variable which disables static lib installation

Static library is still built for shared lib generation.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
tags/v0.2.9^2
Timothy Gu 11 years ago
parent
commit
fe858873af
3 changed files with 10 additions and 0 deletions
  1. +5
    -0
      Makefile
  2. +2
    -0
      Makefile.install
  3. +3
    -0
      Makefile.rule

+ 5
- 0
Makefile View File

@@ -128,6 +128,11 @@ ifeq ($(CORE), UNKOWN)
endif endif
ifeq ($(NOFORTRAN), 1) ifeq ($(NOFORTRAN), 1)
$(error OpenBLAS: Detecting fortran compiler failed. Please install fortran compiler, e.g. gfortran, ifort, openf90.) $(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 endif
@-ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX) @-ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
@for d in $(SUBDIRS) ; \ @for d in $(SUBDIRS) ; \


+ 2
- 0
Makefile.install View File

@@ -50,10 +50,12 @@ ifndef NO_LAPACKE
endif endif


#for install static library #for install static library
ifndef NO_STATIC
@echo Copying the static library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR) @echo Copying the static library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
@install -pm644 $(LIBNAME) $(DESTDIR)$(OPENBLAS_LIBRARY_DIR) @install -pm644 $(LIBNAME) $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
@cd $(DESTDIR)$(OPENBLAS_LIBRARY_DIR) ; \ @cd $(DESTDIR)$(OPENBLAS_LIBRARY_DIR) ; \
ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX) ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
endif
#for install shared library #for install shared library
ifndef NO_SHARED ifndef NO_SHARED
@echo Copying the shared library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR) @echo Copying the shared library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)


+ 3
- 0
Makefile.rule View File

@@ -48,6 +48,9 @@ VERSION = 0.2.9.rc2
# automatically detected by the the script. # automatically detected by the the script.
# NUM_THREADS = 24 # 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. # if you don't need generate the shared library, please comment it in.
# NO_SHARED = 1 # NO_SHARED = 1




Loading…
Cancel
Save