Makefile.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. --- Makefile 2013-01-12 09:35:12.000000000 -0600
  2. +++ Makefile.fixed 2014-07-12 22:27:44.617601703 -0500
  3. @@ -1,9 +1,10 @@
  4. #Makefile for gridloc
  5. +DESTDIR ?= /usr
  6. SHELL = /bin/sh
  7. PROJECT = gridloc
  8. -BINDIR = /usr/local/bin
  9. -DOCDIR = /usr/local/share/doc/
  10. +BINDIR = /usr/bin/
  11. +DOCDIR = /usr/doc/$(PROJECT)-0.7/
  12. CC = gcc -Wall -O2 -march=native -D_FORTIFY_SOURCE=2
  13. objects = calculate.o gridloc.o shared.o screen.o
  14. @@ -14,14 +15,16 @@
  15. $(objects) : $(PROJECT).h
  16. install : $(PROJECT)
  17. - install -m 755 --strip $(PROJECT) $(BINDIR)
  18. - install -m 644 doc/$(PROJECT).html $(DOCDIR)
  19. - install -m 644 default/.$(PROJECT)rc $(HOME)
  20. + install -d -v $(DESTDIR)$(BINDIR)
  21. + install -d -v $(DESTDIR)$(DOCDIR)
  22. + install -m 755 --strip $(PROJECT) $(DESTDIR)$(BINDIR)
  23. + install -m 644 doc/$(PROJECT).html $(DESTDIR)$(DOCDIR)
  24. + install -m 644 default/.$(PROJECT)rc $(DESTDIR)$(DOCDIR)
  25. uninstall :
  26. - rm $(BINDIR)/$(PROJECT)
  27. - rm $(DOCDIR)/$(PROJECT).html
  28. - rm $(HOME)/.$(PROJECT)rc
  29. + rm $(DESTDIR)$(BINDIR)$(PROJECT)
  30. + rm $(DESTDIR)$(DOCDIR)/$(PROJECT).html
  31. + rm $(DESTDIR)$(DOCDIR)/.$(PROJECT)rc
  32. clean :
  33. rm -f *.o *~