Makefile 431 B

123456789101112131415161718
  1. detected_os := $(shell uname)
  2. ifeq ($(detected_os), Darwin)
  3. # Can only write to /usr/local on macOS due to SIP
  4. bin_dir := /usr/local/bin
  5. share_dir := /usr/local/share
  6. else
  7. bin_dir := /usr/bin
  8. share_dir := /usr/share
  9. endif
  10. install: snakesay.py fortunes.txt
  11. install fortunes.txt $(share_dir)/fortunes.txt
  12. install -m 755 snakesay.py $(bin_dir)/snakesay
  13. clean:
  14. rm -rf $(share_dir)/fortunes.txt
  15. rm -rf $(bin_dir)/snakesay.py