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 testpcap libnetmap.so
8 CLEANFILES = $(PROGS) pcap.o
10 CFLAGS += -Werror -Wall -nostdinc -I/usr/include -I../../../sys
13 LDFLAGS += -lpthread -lpcap
15 .include <bsd.prog.mk>
20 testpcap: pcap.c libnetmap.so
21 $(CC) $(CFLAGS) -L. -lnetmap -o ${.TARGET} pcap.c
24 $(CC) $(CFLAGS) -fpic -c ${.ALLSRC}
25 $(CC) -shared -o ${.TARGET} ${.ALLSRC:.c=.o}