diff options
author | Tony Ambardar <itugrok@yahoo.com> | 2018-12-15 18:26:48 -0800 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2019-03-14 22:54:50 +0100 |
commit | f61359e16ef911a8fc01e7028942d9cad0bd8a96 (patch) | |
tree | 5b057ce88b83adeaf85823598f99877798d2bc5b /package/network/utils/iproute2/Makefile | |
parent | 127d38f219962e070483cfeeb9df4811a9df076e (diff) | |
download | upstream-f61359e16ef911a8fc01e7028942d9cad0bd8a96.tar.gz upstream-f61359e16ef911a8fc01e7028942d9cad0bd8a96.tar.bz2 upstream-f61359e16ef911a8fc01e7028942d9cad0bd8a96.zip |
iproute2: support eBFP/XDP object file loading, simplify linking libelf
Add build and runtime dependencies on libelf, allowing tc and ip-full
to load BPF and XDP object files respectively.
Define package 'tc' as a singleton package variant, which can be used to
enable additional functionality limited only to tc. Also set ip-tiny
as the default 'ip' variant.
Preserve optionality of libelf by having configuration script follow the
HAVE_ELF environment variable, used similarly to the HAVE_MNL variable.
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Diffstat (limited to 'package/network/utils/iproute2/Makefile')
-rw-r--r-- | package/network/utils/iproute2/Makefile | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index e7fa6e479d..59b25404b9 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -37,6 +37,7 @@ define Package/ip-tiny $(call Package/iproute2/Default) TITLE:=Routing control utility (Minimal) VARIANT:=tiny + DEFAULT_VARIANT:=1 PROVIDES:=ip ALTERNATIVES:=200:/sbin/ip:/usr/libexec/ip-tiny DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl @@ -48,55 +49,65 @@ $(call Package/iproute2/Default) VARIANT:=full PROVIDES:=ip ALTERNATIVES:=300:/sbin/ip:/usr/libexec/ip-full - DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl + DEPENDS:=+libnl-tiny +libelf +(PACKAGE_devlink||PACKAGE_rdma):libmnl endef define Package/tc $(call Package/iproute2/Default) TITLE:=Traffic control utility + VARIANT:=tc + PROVIDES:=tc DEPENDS:=+kmod-sched-core +libxtables +libelf +(PACKAGE_devlink||PACKAGE_rdma):libmnl endef define Package/genl $(call Package/iproute2/Default) TITLE:=General netlink utility frontend - DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf endef define Package/ip-bridge $(call Package/iproute2/Default) TITLE:=Bridge configuration utility from iproute2 - DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf endef define Package/ss $(call Package/iproute2/Default) TITLE:=Socket statistics utility - DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf endef define Package/nstat $(call Package/iproute2/Default) TITLE:=Network statistics utility - DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf endef define Package/devlink $(call Package/iproute2/Default) TITLE:=Network devlink utility - DEPENDS:=+libmnl + DEPENDS:=+libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf endef define Package/rdma $(call Package/iproute2/Default) TITLE:=Network rdma utility - DEPENDS:=+libmnl + DEPENDS:=+libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf endef ifeq ($(BUILD_VARIANT),tiny) IP_CONFIG_TINY:=y endif +ifeq ($(BUILD_VARIANT),full) + HAVE_ELF:=y +endif + +ifeq ($(BUILD_VARIANT),tc) + HAVE_ELF:=y +endif + ifdef CONFIG_PACKAGE_devlink HAVE_MNL:=y endif @@ -118,6 +129,7 @@ MAKE_FLAGS += \ KERNEL_INCLUDE="$(LINUX_DIR)/user_headers/include" \ SHARED_LIBS="" \ IP_CONFIG_TINY=$(IP_CONFIG_TINY) \ + HAVE_ELF=$(HAVE_ELF) \ HAVE_MNL=$(HAVE_MNL) \ IPT_LIB_DIR=/usr/lib/iptables \ XT_LIB_DIR=/usr/lib/iptables \ |