mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
31 lines
2.0 KiB
Diff
31 lines
2.0 KiB
Diff
# Author: Krassy Boykinov <kboykinov@teamcentrixx.com>
|
|
# based on https://gitweb.gentoo.org/repo/gentoo.git/plain/sci-libs/openblas/files/openblas-0.3.23-shared-blas-lapack.patch
|
|
diff --git a/interface/Makefile b/interface/Makefile
|
|
index 97439d8..8029194 100644
|
|
--- a/interface/Makefile
|
|
+++ b/interface/Makefile
|
|
@@ -2433,3 +2433,23 @@ cblas_cgemm_batch.$(SUFFIX) cblas_cgemm_batch.$(PSUFFIX) : gemm_batch.c ../param
|
|
|
|
cblas_zgemm_batch.$(SUFFIX) cblas_zgemm_batch.$(PSUFFIX) : gemm_batch.c ../param.h
|
|
$(CC) -c $(CFLAGS) -DCBLAS $< -o $(@F)
|
|
+
|
|
+#####
|
|
+shared-blas-lapack: libblas.so.3 libcblas.so.3 liblapack.so.3 liblapacke.so.3
|
|
+
|
|
+# The list of prerequisite is created by comparing with NETLIB BLAS public API.
|
|
+libblas.so.3: $(SBLAS1OBJS) $(SBLAS2OBJS) $(SBLAS3OBJS) $(DBLAS1OBJS) $(DBLAS2OBJS) $(DBLAS3OBJS) $(CBLAS1OBJS) $(CBLAS2OBJS) $(CBLAS3OBJS) $(ZBLAS1OBJS) $(ZBLAS2OBJS) $(ZBLAS3OBJS) ../kernel/lsame.o ../kernel/scabs1.o ../kernel/dcabs1.o ../driver/others/xerbla.o
|
|
+ $(CC) $(LDFLAGS) -shared -o $@ $^ -Wl,-soname,libblas.so.3 -L.. -lopenblas $(EXTRALIB)
|
|
+
|
|
+libcblas.so.3: $(CSBLAS1OBJS) $(CSBLAS2OBJS) $(CSBLAS3OBJS) $(CDBLAS1OBJS) $(CDBLAS2OBJS) $(CDBLAS3OBJS) $(CCBLAS1OBJS) $(CCBLAS2OBJS) $(CCBLAS3OBJS) $(CZBLAS1OBJS) $(CZBLAS2OBJS) $(CZBLAS3OBJS) ../kernel/lsame.o ../kernel/scabs1.o ../kernel/dcabs1.o ../driver/others/xerbla.o
|
|
+ $(CC) $(LDFLAGS) -shared -o $@ $^ -Wl,-soname,libcblas.so.3 -L.. -lopenblas $(EXTRALIB)
|
|
+
|
|
+# The prerequisites must match the symbols deleted in target delete-duplicate-lapack-objects
|
|
+liblapack.so.3: $(SLAPACKOBJS) $(DLAPACKOBJS) $(CLAPACKOBJS) $(ZLAPACKOBJS) ../kernel/lsame.o ../driver/others/xerbla.o
|
|
+ $(CC) $(LDFLAGS) -shared -o $@ $^ ../lapack-netlib/SRC/*.o -Wl,-soname,liblapack.so.3 -L.. -lopenblas $(EXTRALIB)
|
|
+
|
|
+liblapacke.so.3: liblapack.so.3
|
|
+ $(CC) $(LDFLAGS) -shared -o $@ `find ../lapack-netlib/LAPACKE -name "*.o"` -Wl,-soname,liblapacke.so.3 -L.. -lopenblas $(EXTRALIB)
|
|
+
|
|
+clean::
|
|
+ rm -f libblas.so.3 libcblas.so.3 liblapack.so.3
|