aboutsummaryrefslogtreecommitdiffstats
path: root/community/isochronous/make-install.patch
blob: dfcae0b9ee42ed571bcb21330ae1ac4ba3ffed88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From f076d20274415f55645e80b49f76298b2b17d9d6 Mon Sep 17 00:00:00 2001
From: User Detha <detha@jarjar.dnaq.net>
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)