Makefile (6eab2370d142cdfe853d168881b0d4abd3c6f7a6) Makefile (4dba3e7852b7717a20ba206ab23ad289a0a5c504)
1# SPDX-License-Identifier: GPL-2.0
2include ../../../build/Build.include
3include ../../../scripts/Makefile.arch
4include ../../../scripts/Makefile.include
5
6CXX ?= $(CROSS_COMPILE)g++
7
8CURDIR := $(abspath .)

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

68 test_tcp_check_syncookie.sh \
69 test_tc_tunnel.sh \
70 test_tc_edt.sh \
71 test_xdping.sh \
72 test_bpftool_build.sh \
73 test_bpftool.sh \
74 test_bpftool_metadata.sh \
75 test_doc_build.sh \
1# SPDX-License-Identifier: GPL-2.0
2include ../../../build/Build.include
3include ../../../scripts/Makefile.arch
4include ../../../scripts/Makefile.include
5
6CXX ?= $(CROSS_COMPILE)g++
7
8CURDIR := $(abspath .)

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

68 test_tcp_check_syncookie.sh \
69 test_tc_tunnel.sh \
70 test_tc_edt.sh \
71 test_xdping.sh \
72 test_bpftool_build.sh \
73 test_bpftool.sh \
74 test_bpftool_metadata.sh \
75 test_doc_build.sh \
76 test_xsk.sh
76 test_xsk.sh \
77 test_xdp_features.sh
77
78TEST_PROGS_EXTENDED := with_addr.sh \
79 with_tunnels.sh ima_setup.sh verify_sig_setup.sh \
80 test_xdp_vlan.sh test_bpftool.py
81
82# Compile but not part of 'make run_tests'
83TEST_GEN_PROGS_EXTENDED = test_sock_addr test_skb_cgroup_id_user \
84 flow_dissector_load test_flow_dissector test_tcp_check_syncookie_user \
85 test_lirc_mode2_user xdping test_cpp runqslower bench bpf_testmod.ko \
78
79TEST_PROGS_EXTENDED := with_addr.sh \
80 with_tunnels.sh ima_setup.sh verify_sig_setup.sh \
81 test_xdp_vlan.sh test_bpftool.py
82
83# Compile but not part of 'make run_tests'
84TEST_GEN_PROGS_EXTENDED = test_sock_addr test_skb_cgroup_id_user \
85 flow_dissector_load test_flow_dissector test_tcp_check_syncookie_user \
86 test_lirc_mode2_user xdping test_cpp runqslower bench bpf_testmod.ko \
86 xskxceiver xdp_redirect_multi xdp_synproxy veristat xdp_hw_metadata
87 xskxceiver xdp_redirect_multi xdp_synproxy veristat xdp_hw_metadata \
88 xdp_features
87
88TEST_CUSTOM_PROGS = $(OUTPUT)/urandom_read $(OUTPUT)/sign-file
89TEST_GEN_FILES += liburandom_read.so
90
91# Emit succinct information message describing current building step
92# $1 - generic step name (e.g., CC, LINK, etc);
93# $2 - optional "flavor" specifier; if provided, will be emitted as [flavor];
94# $3 - target (assumed to be file); only file name will be emitted;

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

380linked_maps.skel.h-deps := linked_maps1.bpf.o linked_maps2.bpf.o
381# In the subskeleton case, we want the test_subskeleton_lib.subskel.h file
382# but that's created as a side-effect of the skel.h generation.
383test_subskeleton.skel.h-deps := test_subskeleton_lib2.bpf.o test_subskeleton_lib.bpf.o test_subskeleton.bpf.o
384test_subskeleton_lib.skel.h-deps := test_subskeleton_lib2.bpf.o test_subskeleton_lib.bpf.o
385test_usdt.skel.h-deps := test_usdt.bpf.o test_usdt_multispec.bpf.o
386xsk_xdp_progs.skel.h-deps := xsk_xdp_progs.bpf.o
387xdp_hw_metadata.skel.h-deps := xdp_hw_metadata.bpf.o
89
90TEST_CUSTOM_PROGS = $(OUTPUT)/urandom_read $(OUTPUT)/sign-file
91TEST_GEN_FILES += liburandom_read.so
92
93# Emit succinct information message describing current building step
94# $1 - generic step name (e.g., CC, LINK, etc);
95# $2 - optional "flavor" specifier; if provided, will be emitted as [flavor];
96# $3 - target (assumed to be file); only file name will be emitted;

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

382linked_maps.skel.h-deps := linked_maps1.bpf.o linked_maps2.bpf.o
383# In the subskeleton case, we want the test_subskeleton_lib.subskel.h file
384# but that's created as a side-effect of the skel.h generation.
385test_subskeleton.skel.h-deps := test_subskeleton_lib2.bpf.o test_subskeleton_lib.bpf.o test_subskeleton.bpf.o
386test_subskeleton_lib.skel.h-deps := test_subskeleton_lib2.bpf.o test_subskeleton_lib.bpf.o
387test_usdt.skel.h-deps := test_usdt.bpf.o test_usdt_multispec.bpf.o
388xsk_xdp_progs.skel.h-deps := xsk_xdp_progs.bpf.o
389xdp_hw_metadata.skel.h-deps := xdp_hw_metadata.bpf.o
390xdp_features.skel.h-deps := xdp_features.bpf.o
388
389LINKED_BPF_SRCS := $(patsubst %.bpf.o,%.c,$(foreach skel,$(LINKED_SKELS),$($(skel)-deps)))
390
391# Set up extra TRUNNER_XXX "temporary" variables in the environment (relies on
392# $eval()) and pass control to DEFINE_TEST_RUNNER_RULES.
393# Parameters:
394# $1 - test runner base binary name (e.g., test_progs)
395# $2 - test runner extra "flavor" (e.g., no_alu32, gcc-bpf, etc)

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

582$(OUTPUT)/xskxceiver: xskxceiver.c $(OUTPUT)/xsk.o $(OUTPUT)/xsk_xdp_progs.skel.h $(BPFOBJ) | $(OUTPUT)
583 $(call msg,BINARY,,$@)
584 $(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
585
586$(OUTPUT)/xdp_hw_metadata: xdp_hw_metadata.c $(OUTPUT)/network_helpers.o $(OUTPUT)/xsk.o $(OUTPUT)/xdp_hw_metadata.skel.h | $(OUTPUT)
587 $(call msg,BINARY,,$@)
588 $(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
589
391
392LINKED_BPF_SRCS := $(patsubst %.bpf.o,%.c,$(foreach skel,$(LINKED_SKELS),$($(skel)-deps)))
393
394# Set up extra TRUNNER_XXX "temporary" variables in the environment (relies on
395# $eval()) and pass control to DEFINE_TEST_RUNNER_RULES.
396# Parameters:
397# $1 - test runner base binary name (e.g., test_progs)
398# $2 - test runner extra "flavor" (e.g., no_alu32, gcc-bpf, etc)

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

585$(OUTPUT)/xskxceiver: xskxceiver.c $(OUTPUT)/xsk.o $(OUTPUT)/xsk_xdp_progs.skel.h $(BPFOBJ) | $(OUTPUT)
586 $(call msg,BINARY,,$@)
587 $(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
588
589$(OUTPUT)/xdp_hw_metadata: xdp_hw_metadata.c $(OUTPUT)/network_helpers.o $(OUTPUT)/xsk.o $(OUTPUT)/xdp_hw_metadata.skel.h | $(OUTPUT)
590 $(call msg,BINARY,,$@)
591 $(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
592
593$(OUTPUT)/xdp_features: xdp_features.c $(OUTPUT)/network_helpers.o $(OUTPUT)/xdp_features.skel.h | $(OUTPUT)
594 $(call msg,BINARY,,$@)
595 $(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
596
590# Make sure we are able to include and link libbpf against c++.
591$(OUTPUT)/test_cpp: test_cpp.cpp $(OUTPUT)/test_core_extern.skel.h $(BPFOBJ)
592 $(call msg,CXX,,$@)
593 $(Q)$(CXX) $(CFLAGS) $(filter %.a %.o %.cpp,$^) $(LDLIBS) -o $@
594
595# Benchmark runner
596$(OUTPUT)/bench_%.o: benchs/bench_%.c bench.h $(BPFOBJ)
597 $(call msg,CC,,$@)

--- 45 unchanged lines hidden ---
597# Make sure we are able to include and link libbpf against c++.
598$(OUTPUT)/test_cpp: test_cpp.cpp $(OUTPUT)/test_core_extern.skel.h $(BPFOBJ)
599 $(call msg,CXX,,$@)
600 $(Q)$(CXX) $(CFLAGS) $(filter %.a %.o %.cpp,$^) $(LDLIBS) -o $@
601
602# Benchmark runner
603$(OUTPUT)/bench_%.o: benchs/bench_%.c bench.h $(BPFOBJ)
604 $(call msg,CC,,$@)

--- 45 unchanged lines hidden ---