diff --git a/.gitignore b/.gitignore index e7de127..d6b55fd 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ *.sx32fsl *.wx64fsl *.wx32fsl +/slime.lisp diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1be541c --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) +PACKAGE=asteroid +PACKAGEUTILS=asteroid.app-utils +OUT=asteroid +ENTRY=-main + +$(OUT): buildapp *.lisp quicklisp-manifest.txt + ./buildapp --manifest-file quicklisp-manifest.txt \ + --load-system asdf \ + --eval '(push "$(ROOT_DIR)/" asdf:*central-registry*)' \ + --load-system $(PACKAGE) \ + --eval '($(PACKAGEUTILS)::internal-disable-debugger)' \ + --output $(OUT) --entry $(PACKAGE):$(ENTRY) + +quicklisp-manifest.txt: *.asd + sbcl --non-interactive \ + --eval '(push #P"$(ROOT_DIR)/" asdf:*central-registry*)'\ + --eval '(ql:quickload "$(PACKAGE)")'\ + --eval '(ql:write-asdf-manifest-file "quicklisp-manifest.txt")' + +buildapp: + sbcl --eval '(ql:quickload "buildapp")' --eval '(buildapp:build-buildapp)' --non-interactive + +clean: + rm -f *.fasl $(OUT) buildapp quicklisp-manifest.txt diff --git a/app-utils.lisp b/app-utils.lisp new file mode 100644 index 0000000..267957f --- /dev/null +++ b/app-utils.lisp @@ -0,0 +1,40 @@ +;; -*-lisp-*- + +(defpackage :asteroid.app-utils + (:use :cl) + (:export :internal-disable-debugger) + (:export :internal-quit)) + +(in-package :asteroid.app-utils) + +(defun internal-disable-debugger () + (labels + ((internal-exit (c h) + (declare (ignore h)) + (format t "~a~%" c) + (internal-quit))) + (setf *debugger-hook* #'internal-exit))) + +(defun internal-quit (&optional code) + "Taken from the cliki" + ;; This group from "clocc-port/ext.lisp" + #+allegro (excl:exit code) + #+clisp (#+lisp=cl ext:quit #-lisp=cl lisp:quit code) + #+cmu (ext:quit code) + #+cormanlisp (win32:exitprocess code) + #+gcl (lisp:bye code) ; XXX Or is it LISP::QUIT? + #+lispworks (lw:quit :status code) + #+lucid (lcl:quit code) + #+sbcl (sb-ext:exit :code code) + ;; This group from Maxima + #+kcl (lisp::bye) ; XXX Does this take an arg? + #+scl (ext:quit code) ; XXX Pretty sure this *does*. + #+(or openmcl mcl) (ccl::quit) + #+abcl (cl-user::quit) + #+ecl (si:quit) + ;; This group from + #+poplog (poplog::bye) ; XXX Does this take an arg? + #-(or allegro clisp cmu cormanlisp gcl lispworks lucid sbcl + kcl scl openmcl mcl abcl ecl) + + (error 'not-implemented :proc (list 'quit code))) diff --git a/asteroid.asd b/asteroid.asd new file mode 100644 index 0000000..5762ddc --- /dev/null +++ b/asteroid.asd @@ -0,0 +1,19 @@ +;; -*-lisp-*- +;;;; asteroid.asd + +(asdf:defsystem #:asteroid + :description "A radio station to stream Asteroid Music" + :author "Brian O'Reilly " + :license "GNU AFFERO GENERAL PUBLIC LICENSE V.3" + :serial t + :depends-on (:RADIANCE + :MITO + :MITO-AUTH + :STR + :PZMQ + :SPINNERET + ) + :pathname "./" + :components ((:file "app-utils") + (:file "asteroid"))) + diff --git a/asteroid.lisp b/asteroid.lisp new file mode 100644 index 0000000..e2a341c --- /dev/null +++ b/asteroid.lisp @@ -0,0 +1,11 @@ +;; -*-lisp-*- +(defpackage :asteroid + (:use :cl) + (:use :asteroid.app-utils) + (:export :-main)) + +(in-package :asteroid) + +(defun -main (&optional args) + (format t "~a~%" "I don't do much yet")) +