1 # SPDX-License-Identifier: GPL-2.0
3 APIDIR := ../../../../include/uapi
4 TEST_GEN_FILES = action.o
6 top_srcdir = ../../../../..
11 PROBE := $(shell $(LLC) -march=bpf -mcpu=probe -filetype=null /dev/null 2>&1)
19 CLANG_SYS_INCLUDES := $(shell $(CLANG) -v -E - </dev/null 2>&1 \
20 | sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }')
22 CLANG_FLAGS = -I. -I$(APIDIR) \
23 $(CLANG_SYS_INCLUDES) \
24 -Wno-compare-distinct-pointer-types
27 $(CLANG) $(CLANG_FLAGS) \
28 -O2 -target bpf -emit-llvm -c $< -o - | \
29 $(LLC) -march=bpf -mcpu=$(CPU) $(LLC_FLAGS) -filetype=obj -o $@