mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-24 23:40:39 +01:00
[v0.97] Use DESTDIR and PREFIX in Makefile
This commit is contained in:
16
Makefile
16
Makefile
@@ -3,7 +3,7 @@ CC=gcc
|
||||
CFLAGS=-Wall -Wextra -Werror -pedantic -fstack-protector-all -pedantic -std=c99
|
||||
SANITY_FLAGS=-Wfloat-equal -Wshadow -Wpointer-arith
|
||||
|
||||
DESTDIR ?= /usr
|
||||
PREFIX ?= /usr
|
||||
|
||||
SRC_COMMON=src/common/
|
||||
|
||||
@@ -50,14 +50,14 @@ run: $(OUTPUT)
|
||||
./$(OUTPUT)
|
||||
|
||||
clean:
|
||||
@rm $(OUTPUT)
|
||||
@rm -f $(OUTPUT)
|
||||
|
||||
install: $(OUTPUT)
|
||||
install -Dm755 "cpufetch" "$(DESTDIR)/bin/cpufetch"
|
||||
install -Dm644 "LICENSE" "$(DESTDIR)/share/licenses/cpufetch-git/LICENSE"
|
||||
install -Dm644 "cpufetch.8" "$(DESTDIR)/share/man/man8/cpufetch.8.gz"
|
||||
install -Dm755 "cpufetch" "$(DESTDIR)$(PREFIX)/bin/cpufetch"
|
||||
install -Dm644 "LICENSE" "$(DESTDIR)$(PREFIX)/share/licenses/cpufetch-git/LICENSE"
|
||||
install -Dm644 "cpufetch.8" "$(DESTDIR)$(PREFIX)/share/man/man8/cpufetch.8.gz"
|
||||
|
||||
uninstall:
|
||||
rm -f "$(DESTDIR)/bin/cpufetch"
|
||||
rm -f "$(DESTDIR)/share/licenses/cpufetch-git/LICENSE"
|
||||
rm -f "$(DESTDIR)/share/man/man8/cpufetch.8.gz"
|
||||
rm -f "$(DESTDIR)$(PREFIX)/bin/cpufetch"
|
||||
rm -f "$(DESTDIR)$(PREFIX)/share/licenses/cpufetch-git/LICENSE"
|
||||
rm -f "$(DESTDIR)$(PREFIX)/share/man/man8/cpufetch.8.gz"
|
||||
|
||||
Reference in New Issue
Block a user