xref: /freebsd/sbin/ifconfig/Makefile (revision 19887b9c4cec9c6468481ef415bbf94f68592856)
1.include <src.opts.mk>
2
3PACKAGE=runtime
4PROG=	ifconfig
5
6SRCS=	ifconfig.c		# base support
7
8#
9# NB: The order here defines the order in which the constructors
10#     are called.  This in turn defines the default order in which
11#     status is displayed.  Probably should add a priority mechanism
12#     to the registration process so we don't depend on this aspect
13#     of the toolchain.
14#
15SRCS+=	af_link.c		# LLC support
16.if ${MK_INET_SUPPORT} != "no"
17SRCS+=	af_inet.c		# IPv4 support
18.endif
19.if ${MK_INET6_SUPPORT} != "no"
20SRCS+=	af_inet6.c		# IPv6 support
21.endif
22.if ${MK_INET6_SUPPORT} != "no"
23SRCS+=	af_nd6.c		# ND6 support
24SRCS+=	ifstf.c			# STF configuration options
25.endif
26
27SRCS+=	ifclone.c		# clone device support
28SRCS+=	ifmac.c			# MAC support
29SRCS+=	ifmedia.c		# SIOC[GS]IFMEDIA support
30SRCS+=	iffib.c			# non-default FIB support
31SRCS+=	ifvlan.c		# SIOC[GS]ETVLAN support
32SRCS+=	ifvxlan.c		# VXLAN support
33SRCS+=	ifgre.c			# GRE keys etc
34SRCS+=	ifgif.c			# GIF reversed header workaround
35SRCS+=	ifipsec.c		# IPsec VTI
36
37SRCS+=	sfp.c			# SFP/SFP+ information
38LIBADD+=	ifconfig m util
39CFLAGS+=	-I${SRCTOP}/lib/libifconfig -I${OBJTOP}/lib/libifconfig
40
41.if ${MK_WIRELESS_SUPPORT} != "no"
42SRCS+=	ifieee80211.c		# SIOC[GS]IEEE80211 support
43LIBADD+=	80211
44.endif
45
46SRCS+=	carp.c			# SIOC[GS]VH support
47SRCS+=	ifgroup.c		# ...
48.if ${MK_PF} != "no"
49SRCS+=	ifpfsync.c		# pfsync(4) support
50.endif
51
52SRCS+=	ifbridge.c		# bridge support
53SRCS+=	iflagg.c		# lagg support
54
55.if ${MK_INET6_SUPPORT} != "no"
56CFLAGS+= -DINET6
57.endif
58.if ${MK_INET_SUPPORT} != "no"
59CFLAGS+= -DINET
60.endif
61.if ${MK_JAIL} != "no" && !defined(RESCUE)
62CFLAGS+= -DJAIL
63LIBADD+=	jail
64.endif
65LIBADD+=	nv
66
67.if ${MK_NETLINK_SUPPORT} != "no"
68SRCS+=	ifconfig_netlink.c
69SRCS+=	ifgeneve.c		# GENEVE support
70.else
71CFLAGS+=-DWITHOUT_NETLINK
72.endif
73
74MAN=	ifconfig.8
75
76CFLAGS+= -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs
77
78HAS_TESTS=
79SUBDIR.${MK_TESTS}+= tests
80
81.include <bsd.prog.mk>
82