diff options
Diffstat (limited to 'tools/tools/netmap/Makefile')
-rw-r--r-- | tools/tools/netmap/Makefile | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/tools/netmap/Makefile b/tools/tools/netmap/Makefile new file mode 100644 index 000000000000..4b682e52a311 --- /dev/null +++ b/tools/tools/netmap/Makefile @@ -0,0 +1,25 @@ +# +# $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 +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) + +testpcap: pcap.c libnetmap.so + $(CC) $(CFLAGS) -L. -lnetmap -o ${.TARGET} pcap.c + +libnetmap.so: pcap.c + $(CC) $(CFLAGS) -fpic -c ${.ALLSRC} + $(CC) -shared -o ${.TARGET} ${.ALLSRC:.c=.o} |