2021-05-17 07:07:41 +03:00
|
|
|
# $NetBSD: Makefile.common,v 1.7 2021/05/17 04:07:42 yamaguchi Exp $
|
2009-09-16 18:59:45 +04:00
|
|
|
|
|
|
|
# shared stuff with src/distrib/utils/x_ifconfig for install media.
|
|
|
|
# stuff not required by install media should be into Makefile.
|
2008-11-29 18:23:32 +03:00
|
|
|
|
2017-02-09 02:22:43 +03:00
|
|
|
.ifdef SMALLPROG
|
2017-02-09 02:26:24 +03:00
|
|
|
CPPFLAGS+= -DSMALL
|
2017-02-09 02:22:43 +03:00
|
|
|
.endif
|
|
|
|
|
2017-02-09 02:26:24 +03:00
|
|
|
DPADD+= ${LIBUTIL} ${LIBPROP}
|
|
|
|
LDADD+= -lutil -lprop
|
Let us add/remove features from ifconfig, such as support for
various address families (inet, inet6, iso, atalk) and protocols
(802.11, 802.3ad, CARP), simply by trimming the list of sources in
the Makefile. This helps one customize ifconfig for an embedded
device or for install media, and it eliminates a lot of grotty
#ifdef'age. Now, the ifconfig syntax and semantics are finalized
at run-time using the constructor routines in each address-family/protocol
module.
(In principle, ifconfig could load virtually all of its syntax from
shared objects.)
Extract a lot of common code into subroutines, in order to shrink
the ifconfig binary a bit. Make all of the address families share
code for address addition/replacement/removal, and delete "legacy"
code for manipulating addresses. That may have broken atalk and
iso, despite my best efforts.
Extract an include file, Makefile.inc, containing the make-fu that
both ifconfig and x_ifconfig share.
Sprinkle static. Change some int's to bool's. Constify.
Add RCS Ids to carp.c and env.c. Move media code to a new file,
media.c. Delete several unneeded header files.
Set, reset, and display the IEEE 802.11 attribute, 'dot11RTSThreshold'.
Bug fix: do not require both a interface address and a destination
address for point-to-point interfaces, but accept a interface
address by itself.
2008-07-02 11:44:13 +04:00
|
|
|
|
2017-02-09 02:26:24 +03:00
|
|
|
INCS+= af_inetany.h env.h extern.h media.h parse.h util.h
|
2021-03-01 19:47:48 +03:00
|
|
|
SRCS+= af_inet.c af_inetany.c env.c ether.c \
|
2017-05-02 23:12:27 +03:00
|
|
|
ifconfig.c media.c parse.c tunnel.c util.c vlan.c
|
2021-03-01 19:47:48 +03:00
|
|
|
.ifndef NOIEEE80211
|
|
|
|
SRCS+= ieee80211.c
|
|
|
|
.endif
|
2017-05-02 23:12:27 +03:00
|
|
|
.ifndef SMALLPROG
|
2021-05-17 07:07:41 +03:00
|
|
|
SRCS+= agr.c l2tp.c lagg.c
|
2017-05-02 23:12:27 +03:00
|
|
|
.endif
|