1 # SPDX-License-Identifier: GPL-2.0-only
3 include $(TOPDIR
)/rules.mk
7 PKG_RELEASE
:=$(AUTORELEASE
)
9 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
10 PKG_SOURCE_URL
:=https
://downloads.open-mesh.org
/batman
/releases
/batman-adv-
$(PKG_VERSION
)
11 PKG_HASH
:=11071ec02b61e01e05ef8030b7bda8ff15e5c70b294a64204592c5b6cb31ed22
12 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
14 PKG_MAINTAINER
:=Simon Wunderlich
<sw@simonwunderlich.de
>
15 PKG_LICENSE
:=GPL-2.0
-only ISC MIT
16 PKG_LICENSE_FILES
:=LICENSES
/preferred
/GPL-2.0 LICENSES
/preferred
/MIT LICENSES
/deprecated
/ISC
19 PKG_BUILD_FLAGS
:=gc-sections
21 include $(INCLUDE_DIR
)/package.mk
23 define Package
/batctl
/Default
26 URL
:=https
://www.open-mesh.org
/
27 DEPENDS
:=+libnl-tiny
+libc
+librt
31 define Package
/batctl
/description
32 batctl is a more intuitive managment utility for B.A.T.M.A.N.
-Advanced.
33 It is an easier method for configuring batman-adv and provides some
34 additional tools for debugging
as well. This package builds
35 version
$(PKG_VERSION
) of the user space utility.
38 define Package
/batctl-tiny
39 $(call Package
/batctl
/Default
)
40 TITLE
:=B.A.T.M.A.N. Advanced user space configuration tool
(Minimal
)
42 ALTERNATIVES
:=100:/usr
/sbin
/batctl
:/usr
/libexec
/batctl-tiny
45 define Package
/batctl-tiny
/description
46 $(Package
/batctl
/description
)
47 Only configuration relevant subcommands are enabled.
50 define Package
/batctl-default
51 $(call Package
/batctl
/Default
)
52 TITLE
:=B.A.T.M.A.N. Advanced user space configuration tool
(Default
)
54 ALTERNATIVES
:=200:/usr
/sbin
/batctl
:/usr
/libexec
/batctl-default
57 define Package
/batctl-default
/description
58 $(Package
/batctl
/description
)
59 Standard subcommands for configuration and online debugging are enabled.
62 define Package
/batctl-full
63 $(call Package
/batctl
/Default
)
64 TITLE
:=B.A.T.M.A.N. Advanced user space configuration tool
(Full
)
66 ALTERNATIVES
:=300:/usr
/sbin
/batctl
:/usr
/libexec
/batctl-full
69 define Package
/batctl-full
/description
70 $(Package
/batctl
/description
)
71 Subcommands for configuration
, online and offline debugging are enabled.
74 # Link-time optimization allows to move parts of the optimization from the single
75 # source file to the global source view. This is done by emitting the GIMPLE
76 # representation in each object file and analyzing it again during the link step.
78 TARGET_CFLAGS
+= -flto
79 TARGET_LDFLAGS
+= -fuse-linker-plugin
82 LIBNL_NAME
="libnl-tiny" \
83 LIBNL_GENL_NAME
="libnl-tiny"
86 REVISION
="$(PKG_VERSION)-openwrt-$(PKG_RELEASE)"
96 bridge_loop_avoidance \
100 distributed_arp_table \
117 multicast_forceflood \
129 throughput_override \
135 transtable_global_json \
136 transtable_local_json \
143 bridge_loop_avoidance \
144 distributed_arp_table \
153 multicast_forceflood \
158 throughput_override \
183 transtable_global_json \
184 transtable_local_json \
195 config-extratools
:= \
198 ifeq ($(BUILD_VARIANT
),tiny
)
205 ifeq ($(BUILD_VARIANT
),default
)
215 ifeq ($(BUILD_VARIANT
),full
)
222 $(config-extratools
) \
227 $(subst $(space
),,$(foreach opt
,$(config-
$(1)),CONFIG_
$(opt
)=$(1)
232 $(call ConfigVars
,n
)$(call ConfigVars
,y
)
234 $(eval
$(call shexport
,batctl_config
))
236 MAKE_FLAGS
+= $$$$$(call shvar
,batctl_config
)
238 define Package
/batctl-tiny
/install
239 $(INSTALL_DIR
) $(1)/usr
/libexec
240 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/batctl
$(1)/usr
/libexec
/batctl-tiny
243 define Package
/batctl-default
/install
244 $(INSTALL_DIR
) $(1)/usr
/libexec
245 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/batctl
$(1)/usr
/libexec
/batctl-default
248 define Package
/batctl-full
/install
249 $(INSTALL_DIR
) $(1)/usr
/libexec
250 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/batctl
$(1)/usr
/libexec
/batctl-full
253 $(eval
$(call BuildPackage
,batctl-default
))
254 $(eval
$(call BuildPackage
,batctl-tiny
))
255 $(eval
$(call BuildPackage
,batctl-full
))