From 7609fcc6c88b959afde8a2647d7e8809c90637c3 Mon Sep 17 00:00:00 2001 From: emre Date: Thu, 2 Jul 2026 00:20:25 +0300 Subject: [PATCH] simple executable, only hello world --- .gitignore | 1 + Makefile | 4 ++++ build.lisp | 14 ++++++++++++++ lspack.asd | 8 ++++++++ src/main.lisp | 8 ++++++++ 5 files changed, 35 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 build.lisp create mode 100644 src/main.lisp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a3d7638 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +lspack \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8ef5402 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +LISP ?= sbcl + +all: + $(LISP) --load build.lisp diff --git a/build.lisp b/build.lisp new file mode 100644 index 0000000..0eb9720 --- /dev/null +++ b/build.lisp @@ -0,0 +1,14 @@ +(require :asdf) + +#+sb-core-compression +(defmethod asdf:perform ((o asdf:image-op) (c asdf:system)) + (uiop:dump-image (asdf:output-file o c) + :executable t + :compression t)) + +(asdf:load-asd "lspack.asd") +(asdf:load-system "lspack/exe") + +(asdf:make "lspack/exe") + +(quit) diff --git a/lspack.asd b/lspack.asd index 47a7890..f311f3c 100644 --- a/lspack.asd +++ b/lspack.asd @@ -10,3 +10,11 @@ (:file "util") (:file "license") (:file "starter"))) + +(defsystem "lspack/exe" + :depends-on ("lspack") + :build-operation program-op + :build-pathname "lspack" + :entry-point "lspack/exe:main" + :components ((:file "src/main"))) + diff --git a/src/main.lisp b/src/main.lisp new file mode 100644 index 0000000..7218cdd --- /dev/null +++ b/src/main.lisp @@ -0,0 +1,8 @@ +(defpackage :lspack/exe + (:use :cl) + (:export #:main)) + +(in-package :lspack/exe) + +(defun main () + (format t "Hello World!"))