This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathMakefile
51 lines (46 loc) · 2.15 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
INSTALL_DIR = /etc/nvidia-prime
#C_USER = $(shell ls -l "$(shell pwd)"| cut -d' ' -f3 | sed -n "2p")
#USER_DIR = /home/$(C_USER)
.PHONY: all install update uninstall
all: install
install:
mkdir -p $(INSTALL_DIR)
install -Dm755 -t /usr/bin/ nvidia-prime-ui
install -Dm755 -t /usr/sbin/ nvidia-prime-select
install -Dm644 -t $(INSTALL_DIR)/ xorg.nvidia.conf
install -Dm644 -t $(INSTALL_DIR)/ xorg.offload.conf
install -Dm644 -t $(INSTALL_DIR)/ xorg.intel.conf
install -Dm644 -t $(INSTALL_DIR)/ library.conf
install -Dm644 -t $(INSTALL_DIR)/ options.conf
install -Dm644 -t $(INSTALL_DIR)/ report.sample
install -Dm644 -t $(INSTALL_DIR)/ nvidia-prime.desktop
install -Dm644 -t $(INSTALL_DIR)/ nvidia-session.desktop
install -Dm644 -t /usr/share/pixmaps/ nvidia-prime.png
install -Dm644 -t /usr/share/applications/ nvidia-prime-ui.desktop
install -Dm644 -t /usr/share/polkit-1/actions/ com.github.pkexec.nvidia-prime-select.policy
install -Dm644 -t /usr/share/polkit-1/actions/ com.github.pkexec.nvidia-prime-editor.policy
bash ./changelog.sh
update:
# sh ./changelog.sh
install -C -Dm755 -t /usr/bin/ nvidia-prime-ui
install -C -Dm755 -t /usr/sbin/ nvidia-prime-select
install -C -Dm644 -t $(INSTALL_DIR)/ xorg.nvidia.conf
install -C -Dm644 -t $(INSTALL_DIR)/ xorg.offload.conf
install -C -Dm644 -t $(INSTALL_DIR)/ xorg.intel.conf
install -Dm644 -t $(INSTALL_DIR)/ options.conf
install -Dm644 -t $(INSTALL_DIR)/ report.sample
install -C -Dm644 -t $(INSTALL_DIR)/ nvidia-prime.desktop
install -C -Dm644 -t $(INSTALL_DIR)/ nvidia-session.desktop
install -Dm644 -t /usr/share/pixmaps/ nvidia-prime.png
install -Dm644 -t /usr/share/applications/ nvidia-prime-ui.desktop
install -C -Dm644 -t /usr/share/polkit-1/actions/ com.github.pkexec.nvidia-prime-select.policy
install -C -Dm644 -t /usr/share/polkit-1/actions/ com.github.pkexec.nvidia-prime-editor.policy
bash ./changelog.sh
uninstall:
rm -rf $(INSTALL_DIR)
rm -f /usr/sbin/nvidia-prime-select
rm -f /usr/bin/nvidia-prime-ui
rm -f /usr/share/pixmaps/nvidia-prime.png
rm -f /usr/share/applications/nvidia-prime-ui.desktop
rm -f /usr/share/polkit-1/actions/com.github.pkexec.nvidia-prime-*
# rm -f /etc/X11/xorg.conf