blob: 4e1e999e7b0547d56b60806322017bd21c081948 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001# SPDX-License-Identifier: GPL-2.0
2PREFIX ?= /usr
3DESTDIR ?=
4
5all:
6 @echo "Nothing to build"
7
8install : uninstall
9 install -d $(DESTDIR)$(PREFIX)/lib/pm-graph
10 install analyze_suspend.py $(DESTDIR)$(PREFIX)/lib/pm-graph
11 install analyze_boot.py $(DESTDIR)$(PREFIX)/lib/pm-graph
12
13 ln -s $(DESTDIR)$(PREFIX)/lib/pm-graph/analyze_boot.py $(DESTDIR)$(PREFIX)/bin/bootgraph
14 ln -s $(DESTDIR)$(PREFIX)/lib/pm-graph/analyze_suspend.py $(DESTDIR)$(PREFIX)/bin/sleepgraph
15
16 install -d $(DESTDIR)$(PREFIX)/share/man/man8
17 install bootgraph.8 $(DESTDIR)$(PREFIX)/share/man/man8
18 install sleepgraph.8 $(DESTDIR)$(PREFIX)/share/man/man8
19
20uninstall :
21 rm -f $(DESTDIR)$(PREFIX)/share/man/man8/bootgraph.8
22 rm -f $(DESTDIR)$(PREFIX)/share/man/man8/sleepgraph.8
23
24 rm -f $(DESTDIR)$(PREFIX)/bin/bootgraph
25 rm -f $(DESTDIR)$(PREFIX)/bin/sleepgraph
26
27 rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/analyze_boot.py
28 rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/analyze_suspend.py
29 rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/*.pyc
30 if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph ] ; then \
31 rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph; \
32 fi;