3 Commits

Author SHA1 Message Date
5629b0a6d6 install -D not supported on mac 2026-02-11 14:29:27 +01:00
075cdbcdd2 BINDIR and MANDIR 2026-02-11 14:06:31 +01:00
25dc160f11 HOMEBREW_PREFIX 2026-02-11 12:19:45 +01:00

View File

@@ -20,8 +20,13 @@ TARGET = pcapmirror
# Installation directory # Installation directory
PREFIX = /usr PREFIX = /usr
ifdef prefix
PREFIX = $(prefix) ifndef BINDIR
BINDIR = $(DESTDIR)$(PREFIX)/bin
endif
ifndef MANDIR
MANDIR = $(DESTDIR)$(PREFIX)/share/man
endif endif
# Default rule # Default rule
@@ -48,8 +53,8 @@ clean:
# Install the executable # Install the executable
install: $(TARGET) install: $(TARGET)
mkdir -p $(DESTDIR)$(PREFIX)/bin mkdir -p $(DESTDIR)$(PREFIX)/bin
install -s -D $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET) install -s $(TARGET) $(BINDIR)/$(TARGET)
install -D $(TARGET).8 $(DESTDIR)$(PREFIX)/share/man/man8/$(TARGET).8 install $(TARGET).8 $(MANDIR)/man8/$(TARGET).8
# Uninstall the executable # Uninstall the executable