Makefile (e700ac213a0f793fb4f83098413303e3dd080892) Makefile (929bef467771d4d5a22b9edb51a2025dc0e49113)
1# SPDX-License-Identifier: GPL-2.0
2
3BPF_SAMPLES_PATH ?= $(abspath $(srctree)/$(src))
4TOOLS_PATH := $(BPF_SAMPLES_PATH)/../../tools
5
1# SPDX-License-Identifier: GPL-2.0
2
3BPF_SAMPLES_PATH ?= $(abspath $(srctree)/$(src))
4TOOLS_PATH := $(BPF_SAMPLES_PATH)/../../tools
5
6pound := \#
7
6# List of programs to build
7tprogs-y := test_lru_dist
8tprogs-y += sock_example
9tprogs-y += fds_example
10tprogs-y += sockex1
11tprogs-y += sockex2
12tprogs-y += sockex3
13tprogs-y += tracex1

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

227
228# Detect that we're cross compiling and use the cross compiler
229ifdef CROSS_COMPILE
230CLANG_ARCH_ARGS = --target=$(notdir $(CROSS_COMPILE:%-=%))
231endif
232
233# Don't evaluate probes and warnings if we need to run make recursively
234ifneq ($(src),)
8# List of programs to build
9tprogs-y := test_lru_dist
10tprogs-y += sock_example
11tprogs-y += fds_example
12tprogs-y += sockex1
13tprogs-y += sockex2
14tprogs-y += sockex3
15tprogs-y += tracex1

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

229
230# Detect that we're cross compiling and use the cross compiler
231ifdef CROSS_COMPILE
232CLANG_ARCH_ARGS = --target=$(notdir $(CROSS_COMPILE:%-=%))
233endif
234
235# Don't evaluate probes and warnings if we need to run make recursively
236ifneq ($(src),)
235HDR_PROBE := $(shell printf "\#include <linux/types.h>\n struct list_head { int a; }; int main() { return 0; }" | \
237HDR_PROBE := $(shell printf "$(pound)include <linux/types.h>\n struct list_head { int a; }; int main() { return 0; }" | \
236 $(CC) $(TPROGS_CFLAGS) $(TPROGS_LDFLAGS) -x c - \
237 -o /dev/null 2>/dev/null && echo okay)
238
239ifeq ($(HDR_PROBE),)
240$(warning WARNING: Detected possible issues with include path.)
241$(warning WARNING: Please install kernel headers locally (make headers_install).)
242endif
243

--- 177 unchanged lines hidden ---
238 $(CC) $(TPROGS_CFLAGS) $(TPROGS_LDFLAGS) -x c - \
239 -o /dev/null 2>/dev/null && echo okay)
240
241ifeq ($(HDR_PROBE),)
242$(warning WARNING: Detected possible issues with include path.)
243$(warning WARNING: Please install kernel headers locally (make headers_install).)
244endif
245

--- 177 unchanged lines hidden ---