Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 PREFIX          ?= /usr
0003 DESTDIR         ?=
0004 
0005 all:
0006         @echo "Nothing to build"
0007 
0008 install : uninstall
0009         install -d  $(DESTDIR)$(PREFIX)/lib/pm-graph
0010         install sleepgraph.py $(DESTDIR)$(PREFIX)/lib/pm-graph
0011         install bootgraph.py $(DESTDIR)$(PREFIX)/lib/pm-graph
0012         install -d  $(DESTDIR)$(PREFIX)/lib/pm-graph/config
0013         install -m 644 config/cgskip.txt $(DESTDIR)$(PREFIX)/lib/pm-graph/config
0014         install -m 644 config/freeze-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
0015         install -m 644 config/freeze.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
0016         install -m 644 config/freeze-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
0017         install -m 644 config/standby-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
0018         install -m 644 config/standby.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
0019         install -m 644 config/standby-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
0020         install -m 644 config/suspend-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
0021         install -m 644 config/suspend.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
0022         install -m 644 config/suspend-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
0023         install -m 644 config/suspend-x2-proc.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config
0024 
0025         install -d  $(DESTDIR)$(PREFIX)/bin
0026         ln -s ../lib/pm-graph/bootgraph.py $(DESTDIR)$(PREFIX)/bin/bootgraph
0027         ln -s ../lib/pm-graph/sleepgraph.py $(DESTDIR)$(PREFIX)/bin/sleepgraph
0028 
0029         install -d  $(DESTDIR)$(PREFIX)/share/man/man8
0030         install bootgraph.8 $(DESTDIR)$(PREFIX)/share/man/man8
0031         install sleepgraph.8 $(DESTDIR)$(PREFIX)/share/man/man8
0032 
0033 uninstall :
0034         rm -f $(DESTDIR)$(PREFIX)/share/man/man8/bootgraph.8
0035         rm -f $(DESTDIR)$(PREFIX)/share/man/man8/sleepgraph.8
0036 
0037         rm -f $(DESTDIR)$(PREFIX)/bin/bootgraph
0038         rm -f $(DESTDIR)$(PREFIX)/bin/sleepgraph
0039 
0040         rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/config/*
0041         if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph/config ] ; then \
0042                 rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph/config; \
0043         fi;
0044         rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/__pycache__/*
0045         if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph/__pycache__ ] ; then \
0046                 rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph/__pycache__; \
0047         fi;
0048         rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/*
0049         if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph ] ; then \
0050                 rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph; \
0051         fi;