Radme and install target

This commit is contained in:
2025-03-21 00:09:57 +01:00
parent e666d5dc61
commit 50b747f183
2 changed files with 63 additions and 0 deletions

View File

@@ -18,6 +18,9 @@ OBJS = $(SRCS:.c=.o)
# Executable name
TARGET = pcapmirror
# Installation directory
PREFIX = /usr/local
# Default rule
all: $(TARGET)
@@ -33,6 +36,14 @@ $(TARGET): $(OBJS)
clean:
rm -f $(OBJS) $(TARGET)
# Install the executable
install: $(TARGET)
sudo install -D $(TARGET) $(PREFIX)/bin/$(TARGET)
# Uninstall the executable
uninstall:
sudo rm -f $(PREFIX)/bin/$(TARGET)
# Run the executable (example)
run: $(TARGET)
sudo ./$(TARGET) -i eth0 -f "tcp port 80" -v