files := $(wildcard *.lisp) names := $(files:.lisp=) .PHONY: all clean $(names) all: $(names) $(names): %: bin/% bin/%: %.lisp build-binary.sh Makefile mkdir -p bin ./build-binary.sh $< mv $(@F) bin/ clean: rm -rf bin man