Makefile 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # SPDX-License-Identifier: GPL-2.0
  2. PREFIX ?= /usr
  3. DESTDIR ?=
  4. all:
  5. @echo "Nothing to build"
  6. install : uninstall
  7. install -d $(DESTDIR)$(PREFIX)/lib/pm-graph
  8. install sleepgraph.py $(DESTDIR)$(PREFIX)/lib/pm-graph
  9. install bootgraph.py $(DESTDIR)$(PREFIX)/lib/pm-graph
  10. install -d $(DESTDIR)$(PREFIX)/lib/pm-graph/config
  11. install -m 644 config/cgskip.txt $(DESTDIR)$(PREFIX)/lib/pm-graph/config
  12. install -m 644 config/freeze-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
  13. install -m 644 config/freeze.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
  14. install -m 644 config/freeze-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
  15. install -m 644 config/standby-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
  16. install -m 644 config/standby.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
  17. install -m 644 config/standby-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
  18. install -m 644 config/suspend-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
  19. install -m 644 config/suspend.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
  20. install -m 644 config/suspend-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
  21. install -m 644 config/suspend-x2-proc.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
  22. install -d $(DESTDIR)$(PREFIX)/bin
  23. ln -s $(DESTDIR)$(PREFIX)/lib/pm-graph/bootgraph.py $(DESTDIR)$(PREFIX)/bin/bootgraph
  24. ln -s $(DESTDIR)$(PREFIX)/lib/pm-graph/sleepgraph.py $(DESTDIR)$(PREFIX)/bin/sleepgraph
  25. install -d $(DESTDIR)$(PREFIX)/share/man/man8
  26. install bootgraph.8 $(DESTDIR)$(PREFIX)/share/man/man8
  27. install sleepgraph.8 $(DESTDIR)$(PREFIX)/share/man/man8
  28. uninstall :
  29. rm -f $(DESTDIR)$(PREFIX)/share/man/man8/bootgraph.8
  30. rm -f $(DESTDIR)$(PREFIX)/share/man/man8/sleepgraph.8
  31. rm -f $(DESTDIR)$(PREFIX)/bin/bootgraph
  32. rm -f $(DESTDIR)$(PREFIX)/bin/sleepgraph
  33. rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/config/*
  34. if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph/config ] ; then \
  35. rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph/config; \
  36. fi;
  37. rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/*
  38. if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph ] ; then \
  39. rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph; \
  40. fi;