1 ;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; -*-
3 ;;; satwrap.asd --- SAT solver wrapper for CL
5 ;; Copyright (C) 2010 Utz-Uwe Haus <lisp@uuhaus.de>
9 ;; This code is free software; you can redistribute it and/or modify
10 ;; it under the terms of the version 3 of the GNU General
11 ;; Public License as published by the Free Software Foundation, as
12 ;; clarified by the prequel found in LICENSE.Lisp-GPL-Preface.
14 ;; This code is distributed in the hope that it will be useful, but
15 ;; without any warranty; without even the implied warranty of
16 ;; merchantability or fitness for a particular purpose. See the GNU
17 ;; Lesser General Public License for more details.
19 ;; Version 3 of the GNU General Public License is in the file
20 ;; LICENSE.GPL that was distributed with this file. If it is not
21 ;; present, you can access it from
22 ;; http://www.gnu.org/copyleft/gpl.txt (until superseded by a
23 ;; newer version) or write to the Free Software Foundation, Inc., 59
24 ;; Temple Place, Suite 330, Boston, MA 02111-1307 USA
37 (asdf:operate 'asdf:load-op "cffi"))
39 ;; my old asdf-component-shared-unix-library-system.asd, mostly
40 (defclass shared-unix-library (module)
42 :type (or symbol string list pathname)
43 :initarg :library-designator
45 "Library designator suitable to be passed to cffi:load-foreign-library")))
47 ;; (defmethod source-file-type ((component shared-unix-library) system)
49 (defmethod input-files (operation (component shared-unix-library))
51 (defmethod output-files ((operation compile-op) (component shared-unix-library))
53 (defmethod perform ((operation compile-op) (component shared-unix-library))
55 (defmethod operation-done-p ((o compile-op) (c shared-unix-library))
57 (defmethod operation-done-p ((o load-op) (c shared-unix-library))
59 (defmethod perform ((operation load-op) (component shared-unix-library))
60 (let ((cffi:*foreign-library-directories*
61 ;; add autoconf substitution here:
62 `(#p"/Users/uhaus/work/cray/eiger-cpp/.libs/"
63 #p"/usr/local/lib/" ;; might work...
64 ,cffi:*foreign-library-directories*)))
66 (cffi:load-foreign-library
67 (slot-value component 'library-designator))))
68 (format *standard-output*
69 "~&;; loaded shared-unix-library ~A as ~A~%"
70 (component-name component)
77 :author "Utz-Uwe Haus <lisp@uuhaus.de>"
81 :components ((:file "package")
82 (:file "backend" :depends-on ("package"))
88 :components ((:shared-unix-library
96 (:file "satwrap.precosat")))
100 :components ((:shared-unix-library
104 "simp/.libs/libminisat"
105 "simp/.libs/libminisat.so"
108 (:file "satwrap.minisat"))))
109 :depends-on ("backend" "package"))
112 (:file "satwrap" :depends-on ("package"
114 (:file "dimacs" :depends-on ("package" "backend" "satwrap"))