From d30e49d03bb517592e75ab27c16f37c66dbb960f Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Mon, 4 Mar 2024 19:01:37 -0800 Subject: add install/uninstall targets to Makefile --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8278faf..de675f1 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +PREFIX ?= /usr/local + CFLAGS += -O2 -Wall -Wextra -Wpedantic LDFLAGS += -lX11 @@ -13,4 +15,10 @@ $(TARGET): $(OBJ) clean: rm -f $(TARGET) $(OBJ) -.PHONY: all clean +install: all + install -Dt $(DESTDIR)$(PREFIX)/bin $(TARGET) + +uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/$(TARGET) + +.PHONY: all clean install uninstall -- cgit v1.2.3-70-g09d2