From 30d5f5d95de1630cda8b99661dc2b9b329689b36 Mon Sep 17 00:00:00 2001
From: Duncan Overbruck <mail@duncano.de>
Date: Sat, 1 Aug 2026 15:19:55 +0200
Subject: [PATCH] Separate DESTDIR from PREFIX

---
 Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index f6e1ef8..ae6c207 100644
--- a/Makefile
+++ b/Makefile
@@ -64,7 +64,7 @@ MYCFLAGS=$(DEBUG) $(CPPFLAGS) $(CFLAGS) $(YASCC) $(PCACC) $(CCOPT)
 MYLIBS:=$(LIBS) $(YASLD) $(PCALD)
 MYLDFLAGS:=$(LDFLAGS) -fPIE -pie
 
-PREFIX?=$(DESTDIR)/usr
+PREFIX?=/usr
 BINDIR?=$(PREFIX)/sbin
 STRIP?=strip
 INSTALL?=install
@@ -85,8 +85,8 @@ clean:
 	rm -f bpfmon bpfmon.o psort psort.o
 
 install: bpfmon
-	$(INSTALL) -D -m 0755 $< $(BINDIR)/$<
-	$(INSTALL) -D -m 0644 bpfmon.8 $(PREFIX)/share/man/man8/bpfmon.8
+	$(INSTALL) -D -m 0755 $< $(DESTDIR)/$(BINDIR)/$<
+	$(INSTALL) -D -m 0644 bpfmon.8 $(DESTDIR)/$(PREFIX)/share/man/man8/bpfmon.8
 	$(STRIP) $(BINDIR)/$<
 
 mkotar:
-- 
2.55.0

