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