Makefile (2ea352d5960ad469f5712cf3e293db97beac4e01) Makefile (6bf6affe18dafea6ef12036001162ac7f2dbf738)
1# SPDX-License-Identifier: GPL-2.0
2include ../../../../scripts/Kbuild.include
3include ../../../scripts/Makefile.arch
4
5CURDIR := $(abspath .)
6LIBDIR := $(abspath ../../../lib)
7BPFDIR := $(LIBDIR)/bpf
8TOOLSDIR := $(abspath ../../../include)

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

66 with_tunnels.sh \
67 tcp_client.py \
68 tcp_server.py \
69 test_xdp_vlan.sh
70
71# Compile but not part of 'make run_tests'
72TEST_GEN_PROGS_EXTENDED = test_sock_addr test_skb_cgroup_id_user \
73 flow_dissector_load test_flow_dissector test_tcp_check_syncookie_user \
1# SPDX-License-Identifier: GPL-2.0
2include ../../../../scripts/Kbuild.include
3include ../../../scripts/Makefile.arch
4
5CURDIR := $(abspath .)
6LIBDIR := $(abspath ../../../lib)
7BPFDIR := $(LIBDIR)/bpf
8TOOLSDIR := $(abspath ../../../include)

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

66 with_tunnels.sh \
67 tcp_client.py \
68 tcp_server.py \
69 test_xdp_vlan.sh
70
71# Compile but not part of 'make run_tests'
72TEST_GEN_PROGS_EXTENDED = test_sock_addr test_skb_cgroup_id_user \
73 flow_dissector_load test_flow_dissector test_tcp_check_syncookie_user \
74 test_lirc_mode2_user xdping
74 test_lirc_mode2_user xdping test_cpp
75
76TEST_CUSTOM_PROGS = urandom_read
77
78include ../lib.mk
79
80# Define simple and short `make test_progs`, `make test_sysctl`, etc targets
81# to build individual tests.
82# NOTE: Semicolon at the end is critical to override lib.mk's default static

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

312 echo '/* Generated header, do not edit */'; \
313 echo '#ifdef FILL_ARRAY'; \
314 ls *.c 2> /dev/null | sed -e 's@\(.*\)@#include \"\1\"@'; \
315 echo '#endif' \
316 ) > verifier/tests.h)
317$(OUTPUT)/test_verifier: test_verifier.c verifier/tests.h $(BPFOBJ) | $(OUTPUT)
318 $(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
319
75
76TEST_CUSTOM_PROGS = urandom_read
77
78include ../lib.mk
79
80# Define simple and short `make test_progs`, `make test_sysctl`, etc targets
81# to build individual tests.
82# NOTE: Semicolon at the end is critical to override lib.mk's default static

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

312 echo '/* Generated header, do not edit */'; \
313 echo '#ifdef FILL_ARRAY'; \
314 ls *.c 2> /dev/null | sed -e 's@\(.*\)@#include \"\1\"@'; \
315 echo '#endif' \
316 ) > verifier/tests.h)
317$(OUTPUT)/test_verifier: test_verifier.c verifier/tests.h $(BPFOBJ) | $(OUTPUT)
318 $(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
319
320# Make sure we are able to include and link libbpf against c++.
321$(OUTPUT)/test_cpp: test_cpp.cpp $(BPFOBJ)
322 $(CXX) $(CFLAGS) $^ $(LDLIBS) -o $@
323
320EXTRA_CLEAN := $(TEST_CUSTOM_PROGS) \
321 prog_tests/tests.h map_tests/tests.h verifier/tests.h \
322 feature $(OUTPUT)/*.o $(OUTPUT)/no_alu32 $(OUTPUT)/bpf_gcc
324EXTRA_CLEAN := $(TEST_CUSTOM_PROGS) \
325 prog_tests/tests.h map_tests/tests.h verifier/tests.h \
326 feature $(OUTPUT)/*.o $(OUTPUT)/no_alu32 $(OUTPUT)/bpf_gcc