From d968de3b582e191a0de04997716a68f714b60354 Mon Sep 17 00:00:00 2001 From: itycodes Date: Wed, 27 Nov 2024 21:18:07 +0100 Subject: [PATCH] Added an install target for packaging --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index b2b38b9..d37cdd1 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,8 @@ CC = gcc CLIBS = -lwayland-client CFLAGS = $(CLIBS) +DESTDIR ?= /usr/bin + WLR_PROTOCOL_IMPL = wlr-screencopy-protocol.c WLR_PROTOCOL_HEADER = wlr-screencopy-client-protocol.h @@ -17,6 +19,9 @@ clean: rm -f $(WLR_PROTOCOL_IMPL) rm -f $(WLR_PROTOCOL_HEADER) +install: all + cp $(OUT) $(DESTDIR)/ + $(OUT): $(WLR_PROTOCOL_IMPL) $(WLR_PROTOCOL_HEADER) $(SRC) $(CC) $(WLR_PROTOCOL_IMPL) $(SRC) $(CFLAGS) -o $(OUT)