2 BPFDIR
:= $(LIBDIR
)/bpf
3 APIDIR
:= ..
/..
/..
/include/uapi
4 GENDIR
:= ..
/..
/..
/..
/include/generated
5 GENHDR
:= $(GENDIR
)/autoconf.h
7 ifneq ($(wildcard $(GENHDR
)),)
8 GENFLAGS
:= -DHAVE_GENHDR
11 CFLAGS
+= -Wall
-O2
-I
$(APIDIR
) -I
$(LIBDIR
) -I
$(GENDIR
) $(GENFLAGS
) -I..
/..
/..
/include
14 TEST_GEN_PROGS
= test_verifier test_tag test_maps test_lru_map test_lpm_map test_progs \
17 TEST_GEN_FILES
= test_pkt_access.o test_xdp.o test_l4lb.o test_tcp_estats.o
19 TEST_PROGS
:= test_kmod.sh
23 BPFOBJ
:= $(OUTPUT
)/libbpf.a
25 $(TEST_GEN_PROGS
): $(BPFOBJ
)
29 # force a rebuild of BPFOBJ when its dependencies are updated
33 $(MAKE
) -C
$(BPFDIR
) OUTPUT
=$(OUTPUT
)/
38 $(CLANG
) -I.
-I.
/include/uapi
-I..
/..
/..
/include/uapi \
39 -I..
/..
/..
/..
/samples
/bpf
/ \
40 -Wno-compare-distinct-pointer-types \
41 -O2
-target bpf
-c
$< -o
$@