Skip to content

Instantly share code, notes, and snippets.

@letoh
Last active October 25, 2016 02:55
Show Gist options
  • Save letoh/72a856577007f2b8d8c14bd8cfc746cd to your computer and use it in GitHub Desktop.
Save letoh/72a856577007f2b8d8c14bd8cfc746cd to your computer and use it in GitHub Desktop.
Common Lisp package
(defpackage package-a
(:use :cl)
(:export :test-struct))
(in-package :package-a)
(defstruct test-struct
slot1)
(defpackage package-b
(:use :cl
:package-a)
(:export :main))
(in-package :package-b)
(defstruct (test-struct2 (:include test-struct
;(slot1 100)
))
slot2)
(defun main (&rest argv)
(declare (ignorable argv))
(print (make-test-struct2)))
(load "a.lisp")
(load "b.lisp")
(save-application "test-app" :toplevel-function #'package-b:main :prepend-kernel t)
BIN = test-app
all: $(BIN)
test-app: a.lisp b.lisp
ccl64 -l build.lisp
clean:
rm -f $(BIN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment