view src/blas.mk @ 4545:0e56fe2d2ef5

Makefile.in: add update-build-tools target * Makefile.in: add update-build-tools target * src/build-autoconf.mk, src/build-automake.mk, src/build-bison.mk, src/build-gawk.mk, src/build-gcc.mk, src/build-gettext.mk, src/build-gperf.mk, src/build-m4.mk, src/build-texinfo.mk, src/build-libtool.mk : update PKG_UPDATE for getting latest version from gnu.org * src/build-cmake.mk, src/build-flex.mk, src/build-lzip.mk, src/build-pkg-config.mk, src/pkg-config.mk, src/build-scons.mk : add implemented PKG_UPDATE macro
author John Donoghue <john.donoghue@ieee.org>
date Thu, 23 Nov 2017 12:05:29 -0500
parents 29a1845890bd
children 5875a3c3404c
line wrap: on
line source

# This file is part of MXE.
# See index.html for further information.

PKG             := blas
$(PKG)_IGNORE   :=
$(PKG)_VERSION  := 3.7.1
$(PKG)_CHECKSUM := aab1bf3fd5d5fc447f16629bce9b83704b80fd8e
$(PKG)_SUBDIR   := BLAS-$($(PKG)_VERSION)
$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tgz
$(PKG)_URL      := http://www.netlib.org/$(PKG)/$($(PKG)_FILE)
$(PKG)_URL_2    := ftp://ftp.eq.uc.pt/pub/software/math/netlib/$(PKG)/$($(PKG)_FILE)
$(PKG)_DEPS     :=

ifeq ($(ENABLE_FORTRAN_INT64),yes)
  $(PKG)_DEFAULT_INTEGER_8_FLAG := -fdefault-integer-8
endif

define $(PKG)_UPDATE
    echo 1
endef

define $(PKG)_BUILD
    $(SED) -i 's,$$(FORTRAN),$(MXE_F77) $(MXE_F77_PICFLAG) $($(PKG)_DEFAULT_INTEGER_8_FLAG),g' '$(1)/Makefile'
    $(MAKE) -C '$(1)' -j '$(JOBS)'
    cd '$(1)' && $(MXE_AR) cr libblas.a *.o

    if [ $(BUILD_SHARED) = yes ]; then \
      $(MAKE_SHARED_FROM_STATIC) --ar '$(MXE_AR)' --ld '$(MXE_F77)' '$(1)/libblas.a' --install '$(INSTALL)' --libdir '$(3)$(HOST_LIBDIR)' --bindir '$(3)$(HOST_BINDIR)'; \
    fi

    if [ $(BUILD_STATIC) = yes ]; then \
      $(INSTALL) -d '$(3)$(HOST_LIBDIR)'; \
      $(INSTALL) '$(1)/libblas.a' '$(3)$(HOST_LIBDIR)/'; \
    fi
endef