We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 030b849 + 42119c5 commit 0c2552bCopy full SHA for 0c2552b
ebpf_prog/Makefile
@@ -3,8 +3,9 @@
3
# On Debian based distros we need the following 2 directories.
4
# Otherwise, just use the kernel headers from the kernel sources.
5
#
6
-KERNEL_DIR ?= /lib/modules/$(shell uname -r)/source
7
-KERNEL_HEADERS ?= /usr/src/linux-headers-$(shell uname -r)/
+KERNEL_VER ?= $(shell ls -d /lib/modules/*/source | sort | tail -1 | cut -d/ -f4)
+KERNEL_DIR ?= /lib/modules/$(KERNEL_VER)/source
8
+KERNEL_HEADERS ?= /usr/src/linux-headers-$(KERNEL_VER)/
9
CC = clang
10
LLC ?= llc
11
ARCH ?= $(shell uname -m)
0 commit comments