| 1 | ;;; -*- Mode: lisp -*- |
| 2 | |
| 3 | (asdf:oos 'asdf:load-op :clg-tools) |
| 4 | |
| 5 | (defpackage "GFFI-SYSTEM" |
| 6 | (:use "COMMON-LISP" "ASDF" "PKG-CONFIG")) |
| 7 | |
| 8 | #+cmu(ext:unlock-all-packages) |
| 9 | #+sbcl |
| 10 | (progn |
| 11 | (sb-ext:unlock-package "COMMON-LISP") |
| 12 | (sb-ext:unlock-package "SB-PCL")) |
| 13 | |
| 14 | (in-package "GFFI-SYSTEM") |
| 15 | |
| 16 | |
| 17 | #+(and sbcl (not alien-callbacks)) |
| 18 | (eval-when (:compile-toplevel :load-toplevel :execute) |
| 19 | (unless (find-symbol "DEFINE-ALIEN-FUNCTION" "SB-ALIEN") |
| 20 | (error "You need to upgrade SBCL to a version with native C callback support or see the README file about how to add third party callbacks to your current SBCL version."))) |
| 21 | |
| 22 | #+(and sbcl alien-callbacks) |
| 23 | (eval-when (:compile-toplevel :load-toplevel :execute) |
| 24 | (when (find-symbol "DEFINE-ALIEN-FUNCTION" "SB-ALIEN") |
| 25 | (error "Third party C callback code detected in a SBCL image with native callback support. As clg now uses native callbacks when available, you need to use a \"clean\" core file."))) |
| 26 | |
| 27 | |
| 28 | (defsystem gffi |
| 29 | :depends-on (clg-tools) |
| 30 | :components ((:file "defpackage") |
| 31 | #+(and cmu19a (not non-broken-pcl))(:file "pcl") |
| 32 | (:shared-object "gffi-alien" :pathname "alien/" |
| 33 | :components ((:c-source-file "memory"))) |
| 34 | (:file "memory" :depends-on ("defpackage")) |
| 35 | (:file "interface" :depends-on ("memory")) |
| 36 | (:file "basic-types" :depends-on ("gffi-alien" "interface")) |
| 37 | (:file "vectors" :depends-on ("basic-types")) |
| 38 | (:file "enums" :depends-on ("basic-types")) |
| 39 | (:file "virtual-slots" :depends-on (#+(and cmu19a (not non-broken-pcl))"pcl" "interface" "basic-types")) |
| 40 | (:file "proxy" :depends-on ("virtual-slots")))) |