]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/tools/netmap/Makefile
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / tools / netmap / Makefile
1 #
2 # $FreeBSD$
3 #
4 # For multiple programs using a single source file each,
5 # we can just define 'progs' and create custom targets.
6 PROGS   =       pkt-gen bridge vale-ctl testpcap libnetmap.so
7
8 CLEANFILES = $(PROGS) pcap.o nm_util.o
9 NO_MAN=
10 CFLAGS += -Werror -Wall -nostdinc -I/usr/include -I../../../sys
11 CFLAGS += -Wextra
12
13 LDFLAGS += -lpthread -lpcap
14
15 .include <bsd.prog.mk>
16 .include <bsd.lib.mk>
17
18 all: $(PROGS)
19
20 pkt-gen bridge: nm_util.o
21         $(CC) $(CFLAGS) -o ${.TARGET} ${.TARGET:=.c} nm_util.o $(LDFLAGS)
22
23 testpcap: pcap.c libnetmap.so
24         $(CC) $(CFLAGS) -DTEST -L. -lnetmap -o ${.TARGET} pcap.c
25         
26 libnetmap.so:   pcap.c nm_util.c
27         $(CC) $(CFLAGS) -fpic -c ${.ALLSRC}
28         $(CC) -shared -o ${.TARGET} ${.ALLSRC:.c=.o}