xref: /freebsd/sbin/ifconfig/Makefile (revision 7937bfbc0ca53fe7cdd0d54414f9296e273a518e)
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_EXPERIMENTAL} != "no"
56CFLAGS+= -DDRAFT_IETF_6MAN_IPV6ONLY_FLAG
57CFLAGS+= -DEXPERIMENTAL
58.endif
59.if ${MK_INET6_SUPPORT} != "no"
60CFLAGS+= -DINET6
61.endif
62.if ${MK_INET_SUPPORT} != "no"
63CFLAGS+= -DINET
64.endif
65.if ${MK_JAIL} != "no" && !defined(RESCUE)
66CFLAGS+= -DJAIL
67LIBADD+=	jail
68.endif
69LIBADD+=	nv
70
71.if ${MK_NETLINK_SUPPORT} != "no"
72SRCS+=	ifconfig_netlink.c
73.else
74CFLAGS+=-DWITHOUT_NETLINK
75.endif
76
77MAN=	ifconfig.8
78
79CFLAGS+= -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs
80
81HAS_TESTS=
82SUBDIR.${MK_TESTS}+= tests
83
84.include <bsd.prog.mk>
85