Makefile 489 字节
Newer Older
1 2 3 4
LIBDIR := ../../../lib
BPFOBJ := $(LIBDIR)/bpf/bpf.o

CFLAGS += -Wall -O2 -lcap -I../../../include/uapi -I$(LIBDIR)
5

6
test_objs = test_verifier test_tag test_maps test_lru_map test_lpm_map
7

8
TEST_PROGS := $(test_objs) test_kmod.sh
9 10
TEST_FILES := $(test_objs)

11 12
.PHONY: all clean force

13 14
all: $(test_objs)

15 16 17 18 19 20 21
# force a rebuild of BPFOBJ when its dependencies are updated
force:

$(BPFOBJ): force
	$(MAKE) -C $(dir $(BPFOBJ))

$(test_objs): $(BPFOBJ)
22

23 24 25 26
include ../lib.mk

clean:
	$(RM) $(test_objs)