From f8398093b137f33f9243baacb89f7ab48112eb5f Mon Sep 17 00:00:00 2001 From: Felix Kronlage Date: Fri, 12 Apr 2019 22:13:35 +0200 Subject: [PATCH] Proper unix tools come with make install target Merges and closes #22. --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 0b7e044..507b2f7 100644 --- a/Makefile +++ b/Makefile @@ -3,11 +3,18 @@ CC = cc CFLAGS = -std=c99 -Wall -Wextra -Wno-missing-field-initializers -Os LDFLAGS = -ggdb3 LDLIBS = +PREFIX = /usr/local all: endlessh endlessh: endlessh.c $(CC) $(LDFLAGS) $(CFLAGS) -o $@ endlessh.c $(LDLIBS) +install: endlessh + install -d $(DESTDIR)$(PREFIX)/bin + install -m 755 endlessh $(DESTDIR)$(PREFIX)/bin/ + install -d $(DESTDIR)$(PREFIX)/share/man/man1 + install -m 644 endlessh.1 $(DESTDIR)$(PREFIX)/share/man/man1/ + clean: rm -rf endlessh