diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4ac7db2 --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +fortune_directory = /usr/share/fortune + +dat_files = $(wildcard *.dat) + +fortune_files = $(patsubst %.dat, %, $(dat_files)) +fortune_files += $(dat_files) + +targets = $(patsubst %, $(fortune_directory)/%, $(fortune_files)) + +$(targets): $(fortune_directory)/%: % + install -pm644 $< $@ + +.PHONY: install +install: $(targets) + +clean: + $(RM) $(wildcard $(targets))