119914Swollman#	From: @(#)Makefile	8.1 (Berkeley) 6/5/93
250476Speter# $FreeBSD: stable/10/sbin/ifconfig/Makefile 345174 2019-03-15 08:21:11Z avos $
31558Srgrimes
4156905Sru.include <bsd.own.mk>
5156905Sru
61558SrgrimesPROG=	ifconfig
725451Speter
8138593SsamSRCS=	ifconfig.c		# base support
925451Speter
10138593Ssam#
11138593Ssam# NB: The order here defines the order in which the constructors
12138593Ssam#     are called.  This in turn defines the default order in which
13138593Ssam#     status is displayed.  Probably should add a priority mechanism
14138593Ssam#     to the registration process so we don't depend on this aspect
15138593Ssam#     of the toolchain.
16138593Ssam#
17138593SsamSRCS+=	af_link.c		# LLC support
18222527Sbz.if ${MK_INET_SUPPORT} != "no"
19138593SsamSRCS+=	af_inet.c		# IPv4 support
20222527Sbz.endif
21222527Sbz.if ${MK_INET6_SUPPORT} != "no"
22138593SsamSRCS+=	af_inet6.c		# IPv6 support
23222527Sbz.endif
24138593SsamSRCS+=	af_atalk.c		# AppleTalk support
25222527Sbz.if ${MK_INET6_SUPPORT} != "no"
26197138ShrsSRCS+=	af_nd6.c		# ND6 support
27222527Sbz.endif
2844764Swpaul
29138593SsamSRCS+=	ifclone.c		# clone device support
30138593SsamSRCS+=	ifmac.c			# MAC support
31138593SsamSRCS+=	ifmedia.c		# SIOC[GS]IFMEDIA support
32223735SbzSRCS+=	iffib.c			# non-default FIB support
33138593SsamSRCS+=	ifvlan.c		# SIOC[GS]ETVLAN support
34284365SbryanvSRCS+=	ifvxlan.c		# VXLAN support
35181224SthompsaSRCS+=	ifgre.c			# GRE keys etc
36193664ShrsSRCS+=	ifgif.c			# GIF reversed header workaround
3777217Sphk
38286810SmelifaroSRCS+=	sfp.c			# SFP/SFP+ information
39286810SmelifaroDPADD+=	${LIBM}
40286810SmelifaroLDADD+=	-lm
41286810Smelifaro
42345174Savos.if ${MK_WIRELESS_SUPPORT} != "no"
43178354SsamSRCS+=	ifieee80211.c regdomain.c # SIOC[GS]IEEE80211 support
44231642SrmhDPADD+=	${LIBBSDXML} ${LIBSBUF}
45231642SrmhLDADD+=	-lbsdxml -lsbuf
46345174Savos.endif
47178354Ssam
48228577SglebiusSRCS+=	carp.c			# SIOC[GS]VH support
49159781SmlaierSRCS+=	ifgroup.c		# ...
50263086Sglebius.if ${MK_PF} != "no"
51142215SglebiusSRCS+=	ifpfsync.c		# pfsync(4) support
52263086Sglebius.endif
53142215Sglebius
54146987SthompsaSRCS+=	ifbridge.c		# bridge support
55168793SthompsaSRCS+=	iflagg.c		# lagg support
56146987Sthompsa
57222527Sbz.if ${MK_INET6_SUPPORT} != "no"
58222527SbzCFLAGS+= -DINET6
59222527Sbz.endif
60222527Sbz.if ${MK_INET_SUPPORT} != "no"
61222527SbzCFLAGS+= -DINET
62222527Sbz.endif
63156905Sru.if ${MK_IPX_SUPPORT} != "no" && !defined(RELEASE_CRUNCH)
64138593SsamSRCS+=	af_ipx.c		# IPX support
65178354SsamDPADD+=	${LIBIPX}
66178354SsamLDADD+=	-lipx
6780057Sobrien.endif
68231642Srmh.if ${MK_JAIL} != "no" && !defined(RELEASE_CRUNCH) && !defined(RESCUE)
69231642SrmhCFLAGS+= -DJAIL
70231642SrmhDPADD+= ${LIBJAIL}
71231642SrmhLDADD+= -ljail
72231642Srmh.endif
7380057Sobrien
74138593SsamMAN=	ifconfig.8
75138593Ssam
76144130SbrooksCFLAGS+= -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs
77202532SedWARNS?=	2
781558Srgrimes
791558Srgrimes.include <bsd.prog.mk>
80