Makefile revision 227614
1#
2# $FreeBSD: head/tools/tools/netmap/Makefile 227614 2011-11-17 12:17:39Z luigi $
3#
4# For multiple programs using a single source file each,
5# we can just define 'progs' and create custom targets.
6PROGS	=	pkt-gen bridge testpcap libnetmap.so
7
8CLEANFILES = $(PROGS) pcap.o
9NO_MAN=
10CFLAGS += -Werror -Wall -nostdinc -I/usr/include -I../../../sys
11CFLAGS += -Wextra
12
13LDFLAGS += -lpthread -lpcap
14
15.include <bsd.prog.mk>
16.include <bsd.lib.mk>
17
18all: $(PROGS)
19
20testpcap: pcap.c libnetmap.so
21	$(CC) $(CFLAGS) -L. -lnetmap -o ${.TARGET} pcap.c
22	
23libnetmap.so:	pcap.c
24	$(CC) $(CFLAGS) -fpic -c ${.ALLSRC}
25	$(CC) -shared -o ${.TARGET} ${.ALLSRC:.c=.o}
26