Makefile (3bc35c63cb70466c78d3972ceaf8205aa463a192) Makefile (b0b04fc49e3b97a6039b9b658798efdcda71478d)
1# SPDX-License-Identifier: GPL-2.0
2LIBDIR := ../../../lib
3BPFDIR := $(LIBDIR)/bpf
4APIDIR := ../../../include/uapi
5GENDIR := ../../../../include/generated
6GENHDR := $(GENDIR)/autoconf.h
7
8ifneq ($(wildcard $(GENHDR)),)

--- 4 unchanged lines hidden (view full) ---

13LDLIBS += -lcap -lelf
14
15TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map test_progs \
16 test_align test_verifier_log test_dev_cgroup
17
18TEST_GEN_FILES = test_pkt_access.o test_xdp.o test_l4lb.o test_tcp_estats.o test_obj_id.o \
19 test_pkt_md_access.o test_xdp_redirect.o test_xdp_meta.o sockmap_parse_prog.o \
20 sockmap_verdict_prog.o dev_cgroup.o sample_ret0.o test_tracepoint.o \
1# SPDX-License-Identifier: GPL-2.0
2LIBDIR := ../../../lib
3BPFDIR := $(LIBDIR)/bpf
4APIDIR := ../../../include/uapi
5GENDIR := ../../../../include/generated
6GENHDR := $(GENDIR)/autoconf.h
7
8ifneq ($(wildcard $(GENHDR)),)

--- 4 unchanged lines hidden (view full) ---

13LDLIBS += -lcap -lelf
14
15TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map test_progs \
16 test_align test_verifier_log test_dev_cgroup
17
18TEST_GEN_FILES = test_pkt_access.o test_xdp.o test_l4lb.o test_tcp_estats.o test_obj_id.o \
19 test_pkt_md_access.o test_xdp_redirect.o test_xdp_meta.o sockmap_parse_prog.o \
20 sockmap_verdict_prog.o dev_cgroup.o sample_ret0.o test_tracepoint.o \
21 test_l4lb_noinline.o
21 test_l4lb_noinline.o test_xdp_noinline.o
22
23TEST_PROGS := test_kmod.sh test_xdp_redirect.sh test_xdp_meta.sh \
24 test_offload.py
25
26include ../lib.mk
27
28BPFOBJ := $(OUTPUT)/libbpf.a $(OUTPUT)/cgroup_helpers.c
29

--- 19 unchanged lines hidden (view full) ---

49else
50 CPU ?= generic
51endif
52
53CLANG_FLAGS = -I. -I./include/uapi -I../../../include/uapi \
54 -Wno-compare-distinct-pointer-types
55
56$(OUTPUT)/test_l4lb_noinline.o: CLANG_FLAGS += -fno-inline
22
23TEST_PROGS := test_kmod.sh test_xdp_redirect.sh test_xdp_meta.sh \
24 test_offload.py
25
26include ../lib.mk
27
28BPFOBJ := $(OUTPUT)/libbpf.a $(OUTPUT)/cgroup_helpers.c
29

--- 19 unchanged lines hidden (view full) ---

49else
50 CPU ?= generic
51endif
52
53CLANG_FLAGS = -I. -I./include/uapi -I../../../include/uapi \
54 -Wno-compare-distinct-pointer-types
55
56$(OUTPUT)/test_l4lb_noinline.o: CLANG_FLAGS += -fno-inline
57$(OUTPUT)/test_xdp_noinline.o: CLANG_FLAGS += -fno-inline
57
58%.o: %.c
59 $(CLANG) $(CLANG_FLAGS) \
60 -O2 -target bpf -emit-llvm -c $< -o - | \
61 $(LLC) -march=bpf -mcpu=$(CPU) -filetype=obj -o $@
58
59%.o: %.c
60 $(CLANG) $(CLANG_FLAGS) \
61 -O2 -target bpf -emit-llvm -c $< -o - | \
62 $(LLC) -march=bpf -mcpu=$(CPU) -filetype=obj -o $@