xref: /freebsd/tools/tools/netmap/Makefile (revision f0ea3689)
168b8534bSLuigi Rizzo#
268b8534bSLuigi Rizzo# $FreeBSD$
368b8534bSLuigi Rizzo#
468b8534bSLuigi Rizzo# For multiple programs using a single source file each,
568b8534bSLuigi Rizzo# we can just define 'progs' and create custom targets.
6f0ea3689SLuigi RizzoPROGS	=	pkt-gen bridge vale-ctl
768b8534bSLuigi Rizzo
8f0ea3689SLuigi RizzoCLEANFILES = $(PROGS) *.o
968b8534bSLuigi RizzoNO_MAN=
10f0ea3689SLuigi RizzoCFLAGS += -Werror -Wall # -nostdinc -I/usr/include -I../../../sys
1168b8534bSLuigi RizzoCFLAGS += -Wextra
1268b8534bSLuigi Rizzo
13f2637526SLuigi RizzoLDFLAGS += -lpthread
14f2637526SLuigi Rizzo.ifdef WITHOUT_PCAP
15f2637526SLuigi RizzoCFLAGS += -DNO_PCAP
16f2637526SLuigi Rizzo.else
17f2637526SLuigi RizzoLDFLAGS += -lpcap
18f2637526SLuigi Rizzo.endif
1968b8534bSLuigi Rizzo
2068b8534bSLuigi Rizzo.include <bsd.prog.mk>
2168b8534bSLuigi Rizzo.include <bsd.lib.mk>
2268b8534bSLuigi Rizzo
2368b8534bSLuigi Rizzoall: $(PROGS)
2468b8534bSLuigi Rizzo
25f0ea3689SLuigi Rizzopkt-gen: pkt-gen.o
26f0ea3689SLuigi Rizzo	$(CC) $(CFLAGS) -o pkt-gen pkt-gen.o $(LDFLAGS)
2768b8534bSLuigi Rizzo
28f0ea3689SLuigi Rizzobridge: bridge.o
29f0ea3689SLuigi Rizzo	$(CC) $(CFLAGS) -o bridge bridge.o
30f8e4e36aSLuigi Rizzo
31f0ea3689SLuigi Rizzovale-ctl: vale-ctl.o
32f0ea3689SLuigi Rizzo	$(CC) $(CFLAGS) -o vale-ctl vale-ctl.o
33