opnsense-src/tools/tools/netmap/Makefile
Luigi Rizzo f8e4e36a0a update the netmap example programs merging some common code in nm_util.c
pkt-gen now implements several functions (unlimited transmit, receive,
ping-pong) and can operate on a 'tap' device.
2013-02-17 04:43:22 +00:00

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}