1 # SPDX-License-Identifier: GPL-2.0-only 2 3 ifeq ($(srctree),) 4 srctree := $(patsubst %/,%,$(dir $(CUR 5 srctree := $(patsubst %/,%,$(dir $(src 6 srctree := $(patsubst %/,%,$(dir $(src 7 endif 8 9 include $(srctree)/tools/scripts/Makefile.incl 10 11 # O is an alias for OUTPUT 12 OUTPUT := $(O) 13 14 ifeq ($(OUTPUT),) 15 OUTPUT := $(CURDIR) 16 else 17 # subdir is used by the ../Makefile in $(cal 18 ifneq ($(subdir),) 19 OUTPUT := $(OUTPUT)/$(subdir) 20 endif 21 endif 22 23 ifneq ($(patsubst %/,,$(lastword $(OUTPUT))),) 24 OUTPUT := $(OUTPUT)/ 25 endif 26 27 RTLA := $(OUTPUT)rtla 28 RTLA_IN := $(RTLA)-in.o 29 30 VERSION := $(shell sh -c "make -sC ../ 31 DOCSRC := ../../../Documentation/tool 32 33 FEATURE_TESTS := libtraceevent 34 FEATURE_TESTS += libtracefs 35 FEATURE_DISPLAY := libtraceevent 36 FEATURE_DISPLAY += libtracefs 37 38 ifeq ($(V),1) 39 Q = 40 else 41 Q = @ 42 endif 43 44 all: $(RTLA) 45 46 include $(srctree)/tools/build/Makefile.includ 47 include Makefile.rtla 48 49 # check for dependencies only on required targ 50 NON_CONFIG_TARGETS := clean install tarball do 51 52 config := 1 53 ifdef MAKECMDGOALS 54 ifeq ($(filter-out $(NON_CONFIG_TARGETS),$(MAK 55 config := 0 56 endif 57 endif 58 59 ifeq ($(config),1) 60 include $(srctree)/tools/build/Makefile.feat 61 include Makefile.config 62 endif 63 64 CFLAGS += $(INCLUDES) $(LIB_INCLUDES) 65 66 export CFLAGS OUTPUT srctree 67 68 $(RTLA): $(RTLA_IN) 69 $(QUIET_LINK)$(CC) $(LDFLAGS) -o $(RTL 70 71 static: $(RTLA_IN) 72 $(eval LDFLAGS += -static) 73 $(QUIET_LINK)$(CC) -static $(LDFLAGS) 74 75 rtla.%: fixdep FORCE 76 make -f $(srctree)/tools/build/Makefil 77 78 $(RTLA_IN): fixdep FORCE 79 make $(build)=rtla 80 81 clean: doc_clean fixdep-clean 82 $(call QUIET_CLEAN, rtla) 83 $(Q)find . -name '*.o' -delete -o -nam 84 $(Q)rm -f rtla rtla-static fixdep FEAT 85 $(Q)rm -rf feature 86 .PHONY: FORCE clean
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.