add install target to Makefile and corresponding prefix variable to config.mk

main
Keating950 2020-11-22 12:58:49 -05:00
parent 44ef698d6e
commit 9578816487
No known key found for this signature in database
GPG Key ID: E48AEFB61F44AA34
2 changed files with 8 additions and 0 deletions

View File

@ -33,5 +33,10 @@ dwl: xdg-shell-protocol.o
clean:
rm -f dwl *.o xdg-shell-protocol.h xdg-shell-protocol.c
install: dwl
mkdir -p $(PREFIX)/bin
cp -f dwl $(PREFIX)/bin
chmod 755 $(PREFIX)/bin/dwl
.DEFAULT_GOAL=dwl
.PHONY: clean

View File

@ -1,3 +1,6 @@
# paths
PREFIX = /usr/local
# Default compile flags (overridable by environment)
CFLAGS ?= -g -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare -Wno-error=unused-function