mirror of
https://github.com/opnsense/src.git
synced 2026-03-12 05:32:15 -04:00
pkt-gen now implements several functions (unlimited transmit, receive, ping-pong) and can operate on a 'tap' device.
28 lines
693 B
Makefile
28 lines
693 B
Makefile
#
|
|
# $FreeBSD$
|
|
#
|
|
# For multiple programs using a single source file each,
|
|
# we can just define 'progs' and create custom targets.
|
|
PROGS = pkt-gen bridge testpcap libnetmap.so
|
|
|
|
CLEANFILES = $(PROGS) pcap.o nm_util.o
|
|
NO_MAN=
|
|
CFLAGS += -Werror -Wall -nostdinc -I/usr/include -I../../../sys
|
|
CFLAGS += -Wextra
|
|
|
|
LDFLAGS += -lpthread -lpcap
|
|
|
|
.include <bsd.prog.mk>
|
|
.include <bsd.lib.mk>
|
|
|
|
all: $(PROGS)
|
|
|
|
pkt-gen bridge: nm_util.o
|
|
$(CC) $(CFLAGS) -o ${.TARGET} ${.TARGET:=.c} nm_util.o $(LDFLAGS)
|
|
|
|
testpcap: pcap.c libnetmap.so
|
|
$(CC) $(CFLAGS) -DTEST -L. -lnetmap -o ${.TARGET} pcap.c
|
|
|
|
libnetmap.so: pcap.c nm_util.c
|
|
$(CC) $(CFLAGS) -fpic -c ${.ALLSRC}
|
|
$(CC) -shared -o ${.TARGET} ${.ALLSRC:.c=.o}
|