Files
linux/tools/tracing/latency/Makefile
T
Charlie Jenkins 42367eca76 tools: Remove redundant quiet setup
Q is exported from Makefile.include so it is not necessary to manually
set it.

Reviewed-by: Jiri Olsa <[email protected]>
Signed-off-by: Charlie Jenkins <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Acked-by: Quentin Monnet <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Alexei Starovoitov <[email protected]>
Cc: Benjamin Tissoires <[email protected]>
Cc: Daniel Borkmann <[email protected]>
Cc: Daniel Lezcano <[email protected]>
Cc: Eduard Zingerman <[email protected]>
Cc: Hao Luo <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: John Fastabend <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Cc: KP Singh <[email protected]>
Cc: Lukasz Luba <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Martin KaFai Lau <[email protected]>
Cc: Mykola Lysenko <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Song Liu <[email protected]>
Cc: Stanislav Fomichev <[email protected]>
Cc: Steven Rostedt (VMware) <[email protected]>
Cc: Yonghong Song <[email protected]>
Cc: Zhang Rui <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2025-02-18 16:27:43 -03:00

88 lines
2.1 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0-only
ifeq ($(srctree),)
srctree := $(patsubst %/,%,$(dir $(CURDIR)))
srctree := $(patsubst %/,%,$(dir $(srctree)))
srctree := $(patsubst %/,%,$(dir $(srctree)))
endif
include $(srctree)/tools/scripts/Makefile.include
# O is an alias for OUTPUT
OUTPUT := $(O)
ifeq ($(OUTPUT),)
OUTPUT := $(CURDIR)
else
# subdir is used by the ../Makefile in $(call descend,)
ifneq ($(subdir),)
OUTPUT := $(OUTPUT)/$(subdir)
endif
endif
ifneq ($(patsubst %/,,$(lastword $(OUTPUT))),)
OUTPUT := $(OUTPUT)/
endif
LATENCY-COLLECTOR := $(OUTPUT)latency-collector
LATENCY-COLLECTOR_IN := $(LATENCY-COLLECTOR)-in.o
export CC := gcc
export LD := ld
export AR := ar
export PKG_CONFIG := pkg-config
FEATURE_TESTS := libtraceevent
FEATURE_TESTS += libtracefs
FEATURE_DISPLAY := libtraceevent
FEATURE_DISPLAY += libtracefs
all: $(LATENCY-COLLECTOR)
include $(srctree)/tools/build/Makefile.include
# check for dependencies only on required targets
NON_CONFIG_TARGETS := clean install
config := 1
ifdef MAKECMDGOALS
ifeq ($(filter-out $(NON_CONFIG_TARGETS),$(MAKECMDGOALS)),)
config := 0
endif
endif
ifeq ($(config),1)
include $(srctree)/tools/build/Makefile.feature
include Makefile.config
endif
CFLAGS += $(INCLUDES) $(LIB_INCLUDES)
export CFLAGS OUTPUT srctree
$(LATENCY-COLLECTOR): $(LATENCY-COLLECTOR_IN)
$(QUIET_LINK)$(CC) $(LDFLAGS) -o $(LATENCY-COLLECTOR) $(LATENCY-COLLECTOR_IN) $(EXTLIBS)
latency-collector.%: fixdep FORCE
make -f $(srctree)/tools/build/Makefile.build dir=. $@
$(LATENCY-COLLECTOR_IN): fixdep FORCE
make $(build)=latency-collector
INSTALL := install
MKDIR := mkdir
STRIP := strip
BINDIR := /usr/bin
install:
@$(MKDIR) -p $(DESTDIR)$(BINDIR)
$(call QUIET_INSTALL,latency-collector)$(INSTALL) $(LATENCY-COLLECTOR) -m 755 $(DESTDIR)$(BINDIR)
@$(STRIP) $(DESTDIR)$(BINDIR)/latency-collector
clean:
$(call QUIET_CLEAN, latency-collector)
$(Q)find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
$(Q)@rm -f latency-collector fixdep FEATURE-DUMP
$(Q)rm -rf feature
.PHONY: FORCE clean install