1 ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
3 ;;; cffi.asd --- ASDF system definition for CFFI.
5 ;;; Copyright (C) 2005-2006, James Bielman <jamesjb@jamesjb.com>
6 ;;; Copyright (C) 2005-2010, Luis Oliveira <loliveira@common-lisp.net>
8 ;;; Permission is hereby granted, free of charge, to any person
9 ;;; obtaining a copy of this software and associated documentation
10 ;;; files (the "Software"), to deal in the Software without
11 ;;; restriction, including without limitation the rights to use, copy,
12 ;;; modify, merge, publish, distribute, sublicense, and/or sell copies
13 ;;; of the Software, and to permit persons to whom the Software is
14 ;;; furnished to do so, subject to the following conditions:
16 ;;; The above copyright notice and this permission notice shall be
17 ;;; included in all copies or substantial portions of the Software.
19 ;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 ;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 ;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 ;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
23 ;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24 ;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25 ;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26 ;;; DEALINGS IN THE SOFTWARE.
31 #-(or openmcl mcl sbcl cmucl scl clisp lispworks ecl allegro cormanlisp abcl mkcl clasp)
32 (error "Sorry, this Lisp is not yet supported. Patches welcome!")
35 :description "The Common Foreign Function Interface"
36 :author "James Bielman <jamesjb@jamesjb.com>"
37 :maintainer "Luis Oliveira <loliveira@common-lisp.net>"
39 :depends-on (:uiop :alexandria :trivial-features :babel)
40 :in-order-to ((test-op (load-op :cffi-tests)))
41 :perform (test-op (o c) (operate 'asdf:test-op :cffi-tests))
46 (#+openmcl (:file "cffi-openmcl")
47 #+mcl (:file "cffi-mcl")
48 #+sbcl (:file "cffi-sbcl")
49 #+cmucl (:file "cffi-cmucl")
50 #+scl (:file "cffi-scl")
51 #+clisp (:file "cffi-clisp")
52 #+lispworks (:file "cffi-lispworks")
53 #+ecl (:file "cffi-ecl")
54 #+allegro (:file "cffi-allegro")
55 #+cormanlisp (:file "cffi-corman")
56 #+abcl (:file "cffi-abcl")
57 #+mkcl (:file "cffi-mkcl")
58 #+clasp (:file "cffi-clasp")
68 (:file "foreign-vars")
69 (:file "features")))))
71 ;; when you get CFFI from git, its defsystem doesn't have a version,
72 ;; so we assume it satisfies any version requirements whatsoever.
73 (defmethod version-satisfies ((c (eql (find-system :cffi))) version)
74 (declare (ignorable version))
75 (or (null (component-version c))
78 (defsystem "cffi/c2ffi"
79 :description "CFFI definition generator from the FFI spec generated by c2ffi. This system is enough to use the ASDF machinery (as a :defsystem-depends-on)."
80 :author "Attila Lendvai <attila@lendvai.name>"
81 :depends-on (:alexandria
88 (:file "c2ffi" :depends-on ("package"))
89 (:file "asdf" :depends-on ("package" "c2ffi"))))))
91 (defsystem "cffi/c2ffi-generator"
92 :description "This system gets loaded lazily when the CFFI bindings need to be regenerated."
93 :author "Attila Lendvai <attila@lendvai.name>"
94 :depends-on (:cffi/c2ffi
101 ((:file "generator")))))