From f9fb0bcb723765d859bc97b41407f72ca584aa40 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sat, 9 Dec 2023 21:23:07 +0100 Subject: Add an install target --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 344fb30..522ea68 100644 --- a/Makefile +++ b/Makefile @@ -5,11 +5,19 @@ WARNINGS = -Wall -Wextra -Werror -Wpedantic CC = cc CFLAGS = $(WARNINGS) -pipe -O3 -march=native -mtune=native +PREFIX = /usr/local +DPREFIX = $(DESTDIR)$(PREFIX) + all: grab grab: grab.c debug: $(CC) $(WARNINGS) -DGRAB_DEBUG -g -ggdb3 -o grab grab.c +install: + mkdir -p $(DPREFIX)/bin $(DPREFIX)/share/man/man1 + cp grab $(DPREFIX)/bin + cp grab.1 $(DPREFIX)/share/man/man1 + clean: rm -f grab -- cgit v1.2.3