Proper unix tools come with make install target

Merges and closes #22.
This commit is contained in:
Felix Kronlage 2019-04-12 22:13:35 +02:00 committed by Christopher Wellons
parent f6ee532b50
commit f8398093b1

View File

@ -3,11 +3,18 @@ CC = cc
CFLAGS = -std=c99 -Wall -Wextra -Wno-missing-field-initializers -Os CFLAGS = -std=c99 -Wall -Wextra -Wno-missing-field-initializers -Os
LDFLAGS = -ggdb3 LDFLAGS = -ggdb3
LDLIBS = LDLIBS =
PREFIX = /usr/local
all: endlessh all: endlessh
endlessh: endlessh.c endlessh: endlessh.c
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ endlessh.c $(LDLIBS) $(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: clean:
rm -rf endlessh rm -rf endlessh