Project skeleton.

This commit is contained in:
Brian O'Reilly 2025-08-12 10:59:34 -04:00
parent c43eb7eb97
commit 746a6c9d72
5 changed files with 96 additions and 0 deletions

1
.gitignore vendored
View File

@ -15,3 +15,4 @@
*.sx32fsl
*.wx64fsl
*.wx32fsl
/slime.lisp

25
Makefile Normal file
View File

@ -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

40
app-utils.lisp Normal file
View File

@ -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 <hebi...@math.uni.wroc.pl>
#+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)))

19
asteroid.asd Normal file
View File

@ -0,0 +1,19 @@
;; -*-lisp-*-
;;;; asteroid.asd
(asdf:defsystem #:asteroid
:description "A radio station to stream Asteroid Music"
:author "Brian O'Reilly <fade@deepsky.com>"
: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")))

11
asteroid.lisp Normal file
View File

@ -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"))