1 LIBDIR := ../../../lib 2 BPFDIR := $(LIBDIR)/bpf 3 APIDIR := ../../../include/uapi 4 GENDIR := ../../../../include/generated 5 GENHDR := $(GENDIR)/autoconf.h 6 7 ifneq ($(wildcard $(GENHDR)),) 8 GENFLAGS := -DHAVE_GENHDR 9 endif 10 11 CFLAGS += -Wall -O2 -I$(APIDIR) -I$(LIBDIR) -I$(GENDIR) $(GENFLAGS) 12 LDLIBS += -lcap 13 14 TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map 15 16 TEST_PROGS := test_kmod.sh 17 18 include ../lib.mk 19 20 BPFOBJ := $(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 27 force: 28 29 $(BPFOBJ): force 30 $(MAKE) -C $(BPFDIR) OUTPUT=$(OUTPUT)/ 31