1 include $(TOPDIR
)/rules.mk
3 PKG_NAME
:=ucode-mod-bpf
6 PKG_MAINTAINER
:=Felix Fietkau
<nbd@nbd.name
>
8 include $(INCLUDE_DIR
)/package.mk
9 include $(INCLUDE_DIR
)/nls.mk
11 define Package
/ucode-mod-bpf
14 TITLE
:=ucode eBPF module
15 DEPENDS
:=+libucode
+libbpf
18 define Package
/ucode-mod-bpf
/description
19 The bpf plugin provides functionality for loading and interacting with
22 It allows loading full modules and pinned maps
/programs and supports
23 interacting with maps and attaching programs
as tc classifiers.
26 define Package
/ucode-mod-bpf
/install
27 $(INSTALL_DIR
) $(1)/usr
/lib
/ucode
28 $(CP
) $(PKG_BUILD_DIR
)/bpf.so
$(1)/usr
/lib
/ucode
/
31 define Build
/Configure
35 $(TARGET_CC
) $(TARGET_CFLAGS
) $(TARGET_LDFLAGS
) $(FPIC
) \
36 -Wall
-ffunction-sections
-Wl
,--gc-sections
-shared
-Wl
,--no-as-needed
-lbpf \
37 -o
$(PKG_BUILD_DIR
)/bpf.so
$(PKG_BUILD_DIR
)/bpf.c
40 $(eval
$(call BuildPackage
,ucode-mod-bpf
))