Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1LIBDIR := ../../../lib
2BPFDIR := $(LIBDIR)/bpf
3APIDIR := ../../../include/uapi
4GENDIR := ../../../../include/generated
5GENHDR := $(GENDIR)/autoconf.h
6
7ifneq ($(wildcard $(GENHDR)),)
8 GENFLAGS := -DHAVE_GENHDR
9endif
10
11CFLAGS += -Wall -O2 -I$(APIDIR) -I$(LIBDIR) -I$(GENDIR) $(GENFLAGS)
12LDLIBS += -lcap
13
14TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map
15
16TEST_PROGS := test_kmod.sh
17
18include ../lib.mk
19
20BPFOBJ := $(OUTPUT)/bpf.o
21
22$(TEST_GEN_PROGS): $(BPFOBJ)
23
24.PHONY: force
25
26# force a rebuild of BPFOBJ when its dependencies are updated
27force:
28
29$(BPFOBJ): force
30 $(MAKE) -C $(BPFDIR) OUTPUT=$(OUTPUT)/