chiark / gitweb /
Library extensions not hard coded any more
[clg] / tools / asdf-extensions.lisp
index 93be2d353f813a313bc6fb7188de130dc82f7b56..14a4db7862a7ea6d2297418ff71d76ce7e1a247e 100644 (file)
@@ -1,6 +1,9 @@
 (in-package :asdf)
 
-(export 'load-dso)
+(export '*dso-extension*)
+
+(defvar *dso-extension* #-darwin"so" #+darwin"dylib")
+
 
 (defun concatenate-strings (strings &optional delimiter)
   (if (not (rest strings))
@@ -27,7 +30,7 @@ (defmethod input-files ((operation compile-op) (dso unix-dso))
 (defmethod output-files ((operation compile-op) (dso unix-dso))
   (let ((dir (component-pathname dso)))
     (list
-     (make-pathname :type "so"
+     (make-pathname :type *dso-extension*
                    :name (car (last (pathname-directory dir)))
                    :directory (butlast (pathname-directory dir))
                    :defaults dir))))
@@ -125,7 +128,7 @@ (defun split-path (path)
 
 
 (defmethod component-pathname ((lib library))
-  (make-pathname :type "so"
+  (make-pathname :type *dso-extension*
                 :name (component-name lib)
                 :directory (split-path (slot-value lib 'libdir))))