mirror of
https://git.freestone.net/cramer/pcapmirror.git
synced 2025-12-31 03:50:27 +01:00
Initial Version
This commit is contained in:
38
Makefile
Normal file
38
Makefile
Normal file
@@ -0,0 +1,38 @@
|
||||
# Makefile for pcapmirror
|
||||
|
||||
# Compiler
|
||||
CC = gcc
|
||||
|
||||
# Compiler flags
|
||||
CFLAGS = -Wall -g
|
||||
|
||||
# Libraries
|
||||
LIBS = -lpcap
|
||||
|
||||
# Source files
|
||||
SRCS = main.c
|
||||
|
||||
# Object files
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
# Executable name
|
||||
TARGET = pcapmirror
|
||||
|
||||
# Default rule
|
||||
all: $(TARGET)
|
||||
|
||||
# Create executable
|
||||
$(TARGET): $(OBJS)
|
||||
$(CC) $(CFLAGS) $(OBJS) -o $(TARGET) $(LIBS)
|
||||
|
||||
# Create object files
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# Clean up object files and executable
|
||||
clean:
|
||||
rm -f $(OBJS) $(TARGET)
|
||||
|
||||
# Run the executable (example)
|
||||
run: $(TARGET)
|
||||
sudo ./$(TARGET) -i eth0 -f "tcp port 80" -v
|
||||
Reference in New Issue
Block a user