57 lines
1.5 KiB
Makefile
57 lines
1.5 KiB
Makefile
EXE = sbcl
|
|
FLAGS = --no-userinit --no-sysinit --non-interactive
|
|
|
|
BUILDDIR = ./build
|
|
QL = $(BUILDDIR)/quicklisp
|
|
LIBS= $(BUILDDIR)/libs.stamp
|
|
|
|
.PHONY: all clean cleanall
|
|
all: $(BUILDDIR)/pegrep-debug
|
|
fast: $(BUILDDIR)/pegrep
|
|
|
|
# Make executable with full debug support and slower execution time
|
|
$(BUILDDIR)/pegrep-debug: $(LIBS)
|
|
$(EXE) $(FLAGS) \
|
|
--load $(QL)/setup.lisp \
|
|
--load ./src/pegrep.asd \
|
|
--eval '(ql:quickload :alexandria)' \
|
|
--eval '(asdf:disable-output-translations)' \
|
|
--eval '(asdf:load-system :pegrep-debug)' \
|
|
--eval '(asdf:make :pegrep-debug)' \
|
|
--eval '(quit)'
|
|
|
|
$(BUILDDIR)/pegrep: $(LIBS)
|
|
$(EXE) $(FLAGS) \
|
|
--load $(QL)/setup.lisp \
|
|
--load ./src/pegrep.asd \
|
|
--eval '(ql:quickload :alexandria)' \
|
|
--eval '(asdf:disable-output-translations)' \
|
|
--eval '(asdf:load-system :pegrep)' \
|
|
--eval '(asdf:make :pegrep)' \
|
|
--eval '(quit)'
|
|
|
|
# Remove binaries and fasl compiled files
|
|
clean:
|
|
rm -f build/pegrep*
|
|
find . -name "*.fasl" -type f -delete
|
|
|
|
# Remove everything, including libraries
|
|
cleanall: clean
|
|
rm -rf build
|
|
|
|
$(LIBS): $(QL)/setup.lisp
|
|
$(EXE) $(FLAGS) \
|
|
--load $(QL)/setup.lisp \
|
|
--eval '(ql:quickload :alexandria)' \
|
|
--eval '(quit)'
|
|
touch $@
|
|
|
|
$(QL)/quicklisp.lisp:
|
|
mkdir -p build/quicklisp
|
|
wget -P build/quicklisp/ http://beta.quicklisp.org/quicklisp.lisp
|
|
|
|
$(QL)/setup.lisp: $(QL)/quicklisp.lisp
|
|
$(EXE) $(FLAGS) \
|
|
--load $(QL)/quicklisp.lisp \
|
|
--eval '(quicklisp-quickstart:install :path "$(BUILDDIR)/quicklisp")' \
|
|
--eval '(quit)'
|