From 95788164874890ec99dbc23a4e460b1781cc7be3 Mon Sep 17 00:00:00 2001 From: Keating950 Date: Sun, 22 Nov 2020 12:58:49 -0500 Subject: [PATCH] add install target to Makefile and corresponding prefix variable to config.mk --- Makefile | 5 +++++ config.mk | 3 +++ 2 files changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 56ab751..7f17cc6 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/config.mk b/config.mk index a101f23..3958049 100644 --- a/config.mk +++ b/config.mk @@ -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