freebsd-src/lib/libifconfig/Makefile

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
895 B
Makefile
Raw Normal View History

PACKAGE= lib${LIB}
LIB= ifconfig
INTERNALLIB= true
LIBADD= m
SHLIBDIR?= /lib
SHLIB_MAJOR= 2
VERSION_DEF= ${LIBCSRCDIR}/Versions.def
SYMBOL_MAPS= ${.CURDIR}/Symbol.map
SRCS= libifconfig.c \
libifconfig_bridge.c \
libifconfig_carp.c \
libifconfig_inet.c \
libifconfig_inet6.c \
libifconfig_internal.c \
libifconfig_lagg.c \
Move ifconfig SFP status functionality into libifconfig libifconfig_sfp.h provides an API in libifconfig for querying SFP module properties, operational status, and vendor strings, as well as descriptions of the various fields, string conversions, and other useful helpers for implementing user interfaces. SFP module status is obtained by reading registers via an I2C interface. Descriptions of these registers and the values therein have been collected in a Lua table which is used to generate all the boilerplace C headers and source files for accessing these values, their names, and descriptions. The generated code is fully commented and readable. This is the first use of libifconfig in ifconfig itself. For now, the scope remains very limited. Over time, more of ifconfig will be replaced with libifconfig. Some minor changes to the formatting of ifconfig output have been made: - Module memory hex dumps are indented one extra space as a result of using hexdump(3) instead of a bespoke hex dump function. - Media descriptions have an added two-character short-name in parenthesis. - QSFP modules were incorrectly displaying TX bias current as power. Now TX channels display bias current, and this change has been made for both SFP and QSFP modules for consistency. A Lua binding for libifconfig including this functionality is implemented but has not been included in this commit. The plan is for it to be committed after dynamic module loading has been enabled in flua. Reviewed by: kp, melifaro Relnotes: yes Differential Revision: https://reviews.freebsd.org/D25494
2020-08-09 16:27:28 +00:00
libifconfig_media.c \
libifconfig_sfp.c
GEN= libifconfig_sfp_tables.h \
libifconfig_sfp_tables.c \
libifconfig_sfp_tables_internal.h
SRCS+= ${GEN}
.include <src.lua.mk>
.SUFFIXES: .tpl.c .tpl.h
.tpl.c.c .tpl.h.h: sfp.lua
${LUA} ${.CURDIR}/sfp.lua ${.IMPSRC} >${.TARGET}
CLEANFILES+= ${GEN}
# If libifconfig become public uncomment those two lines
#INCSDIR= ${INCLUDEDIR}
Move ifconfig SFP status functionality into libifconfig libifconfig_sfp.h provides an API in libifconfig for querying SFP module properties, operational status, and vendor strings, as well as descriptions of the various fields, string conversions, and other useful helpers for implementing user interfaces. SFP module status is obtained by reading registers via an I2C interface. Descriptions of these registers and the values therein have been collected in a Lua table which is used to generate all the boilerplace C headers and source files for accessing these values, their names, and descriptions. The generated code is fully commented and readable. This is the first use of libifconfig in ifconfig itself. For now, the scope remains very limited. Over time, more of ifconfig will be replaced with libifconfig. Some minor changes to the formatting of ifconfig output have been made: - Module memory hex dumps are indented one extra space as a result of using hexdump(3) instead of a bespoke hex dump function. - Media descriptions have an added two-character short-name in parenthesis. - QSFP modules were incorrectly displaying TX bias current as power. Now TX channels display bias current, and this change has been made for both SFP and QSFP modules for consistency. A Lua binding for libifconfig including this functionality is implemented but has not been included in this commit. The plan is for it to be committed after dynamic module loading has been enabled in flua. Reviewed by: kp, melifaro Relnotes: yes Differential Revision: https://reviews.freebsd.org/D25494
2020-08-09 16:27:28 +00:00
#INCS= libifconfig.h libifconfig_sfp.h libifconfig_sfp_tables.h
#MAN= libifconfig.3
Move ifconfig SFP status functionality into libifconfig libifconfig_sfp.h provides an API in libifconfig for querying SFP module properties, operational status, and vendor strings, as well as descriptions of the various fields, string conversions, and other useful helpers for implementing user interfaces. SFP module status is obtained by reading registers via an I2C interface. Descriptions of these registers and the values therein have been collected in a Lua table which is used to generate all the boilerplace C headers and source files for accessing these values, their names, and descriptions. The generated code is fully commented and readable. This is the first use of libifconfig in ifconfig itself. For now, the scope remains very limited. Over time, more of ifconfig will be replaced with libifconfig. Some minor changes to the formatting of ifconfig output have been made: - Module memory hex dumps are indented one extra space as a result of using hexdump(3) instead of a bespoke hex dump function. - Media descriptions have an added two-character short-name in parenthesis. - QSFP modules were incorrectly displaying TX bias current as power. Now TX channels display bias current, and this change has been made for both SFP and QSFP modules for consistency. A Lua binding for libifconfig including this functionality is implemented but has not been included in this commit. The plan is for it to be committed after dynamic module loading has been enabled in flua. Reviewed by: kp, melifaro Relnotes: yes Differential Revision: https://reviews.freebsd.org/D25494
2020-08-09 16:27:28 +00:00
CFLAGS+= -I${.CURDIR} -I${.OBJDIR}
NO_WCAST_ALIGN= yes
.include <bsd.lib.mk>