LISP ?= sbcl PREFIX ?= /usr/local BINDIR ?= ${PREFIX}/bin MANDIR ?= ${PREFIX}/share/man MAN1DIR ?= ${MANDIR}/man1 all: build clean: -rm mirror-img quicklisp: curl "https://beta.quicklisp.org/quicklisp.lisp" -o /tmp/ql.lisp $(LISP) --load /tmp/ql.lisp \ --eval '(quicklisp-quickstart:install :path "~/.local/lib/quicklisp/")' \ --eval '(ql:add-to-init-file)' \ --eval '(quit)' mirror-img: $(LISP) --load mirror-img.asd \ --eval '(ql:quickload :mirror-img)' \ --eval '(ql:quickload :mirror-img/unix)' \ --eval '(asdf:make :mirror-img/unix)' \ --eval '(quit)' build: mirror-img install: build install -m 775 mirror-img ${BINDIR} install -m 444 mirror-img.1 ${MAN1DIR} uninstall: rm ${BINDIR}/mirror-img rm ${MAN1DIR}/mirror-img.1 test: $(LISP) --load mirror-img.asd \ --eval '(ql:quickload :mirror-img)' \ --eval '(asdf:test-system :mirror-img)' \ --eval '(quit)'