Skip to content

Commit

Permalink
Merge from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
Symbolics committed Jan 28, 2024
2 parents 6b9bae4 + 0b0bcb2 commit 789733f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cephes.asd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
(defmethod perform ((o compile-op) (c makefile))
(let* ((lib-dir (system-relative-pathname "cephes" "scipy-cephes/"))
(lib (make-pathname :directory (pathname-directory lib-dir)
:name "libmd"
:name #+(or (and unix (not darwin)) windows win32) "libmd"
#+(and darwin arm64) "libmd-arm64"
#+(and darwin x86-64) "libmd-x86-64"
:device (pathname-device lib-dir)
:type #+darwin "dylib"
#+(and unix (not darwin)) "so"
Expand Down
3 changes: 2 additions & 1 deletion init.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
(:windows (:or "libmd"
#.(merge-pathnames "scipy-cephes/libmd.dll" *compile-file-pathname*)))
(:darwin (:or "libmd"
#.(merge-pathnames "scipy-cephes/libmd.dylib" *compile-file-pathname*)))
#+x86-64 #.(merge-pathnames "scipy-cephes/libmd-x86-64.dylib" *compile-file-pathname*)
#+arm64 #.(merge-pathnames "scipy-cephes/libmd-arm64.dylib" *compile-file-pathname*)))
(:unix (:or "libmd"
#.(merge-pathnames "scipy-cephes/libmd.so" *compile-file-pathname*)))
(t (:default "libmd")))
Expand Down
8 changes: 7 additions & 1 deletion scipy-cephes/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ ifeq ($(OS),Windows_NT)
OUTPUT = libmd.dll
else # UNIX, use uname to determine which one
UNAME_S := $(shell uname -s)
UNAME_M := $(shell uname -m)
ifeq ($(UNAME_S), Linux)
LDFLAGS = -lm
OUTPUT = libmd.so
endif
ifeq ($(UNAME_S), Darwin)
LDFLAGS = -lm
OUTPUT = libmd.dylib
ifeq ($(UNAME_M), arm64)
OUTPUT = libmd-arm64.dylib
else
OUTPUT = libmd-x86-64.dylib
endif
endif
endif

Expand Down Expand Up @@ -115,6 +120,7 @@ clean:
rm -f libmd.a
rm -f libmd.dll
rm -f libmd.so
rm -f libmd-*.dylib
rm -f time-it
rm -f dtestvec

Binary file added scipy-cephes/libmd-arm64.dylib
Binary file not shown.
Binary file added scipy-cephes/libmd-x86-64.dylib
Binary file not shown.

0 comments on commit 789733f

Please sign in to comment.