From f076d20274415f55645e80b49f76298b2b17d9d6 Mon Sep 17 00:00:00 2001 From: User Detha Date: Sat, 28 Mar 2020 10:04:28 +0000 Subject: [PATCH] Add install target --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index 15266af..bfe1d54 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,11 @@ CFLAGS+=-std=gnu99 -g LDFLAGS+=-lrt -lm + +DESTDIR= +PREFIX=/usr +BINDIR=$(PREFIX)/bin +MANDIR=$(PREFIX)/man + PROGS=udpstress isoping isostream all: $(PROGS) @@ -13,5 +19,9 @@ isoping: isoping.c isostream: isostream.c $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) +install: all + mkdir -p $(DESTDIR)$(BINDIR) + install -m0755 $(PROGS) $(DESTDIR)$(BINDIR) + clean: rm -f $(PROGS)