1 # SPDX-License-Identifier: GPL-2.0-only
4 srctree
:= $(patsubst %/,%,$(dir $(CURDIR
)))
5 srctree
:= $(patsubst %/,%,$(dir $(srctree
)))
6 srctree
:= $(patsubst %/,%,$(dir $(srctree
)))
9 include $(srctree
)/tools
/scripts
/Makefile.
include
11 # O is an alias for OUTPUT
17 # subdir is used by the ../Makefile in $(call descend,)
19 OUTPUT
:= $(OUTPUT
)/$(subdir
)
23 ifneq ($(patsubst %/,,$(lastword
$(OUTPUT
))),)
30 VERSION
:= $(shell sh
-c
"make -sC ../../.. kernelversion | grep -v make")
31 DOCSRC
:= ..
/..
/..
/Documentation
/tools
/rv
/
33 FEATURE_TESTS
:= libtraceevent
34 FEATURE_TESTS
+= libtracefs
35 FEATURE_DISPLAY
:= libtraceevent
36 FEATURE_DISPLAY
+= libtracefs
46 include $(srctree
)/tools
/build
/Makefile.
include
49 # check for dependencies only on required targets
50 NON_CONFIG_TARGETS
:= clean install doc doc_clean doc_install
54 ifeq ($(filter-out $(NON_CONFIG_TARGETS
),$(MAKECMDGOALS
)),)
60 include $(srctree
)/tools
/build
/Makefile.feature
61 include Makefile.config
64 CFLAGS
+= $(INCLUDES
) $(LIB_INCLUDES
)
66 export CFLAGS OUTPUT srctree
69 $(QUIET_LINK
)$(CC
) $(LDFLAGS
) -o
$(RV
) $(RV_IN
) $(EXTLIBS
)
72 $(eval LDFLAGS
+= -static
)
73 $(QUIET_LINK
)$(CC
) $(LDFLAGS
) -o
$(RV
)-static
$(RV_IN
) $(EXTLIBS
)
76 make
-f
$(srctree
)/tools
/build
/Makefile.build
dir=.
$@
78 $(RV_IN
): fixdep FORCE
81 clean: doc_clean fixdep-clean
82 $(call QUIET_CLEAN
, rv
)
83 $(Q
)find .
-name
'*.o' -delete
-o
-name
'\.*.cmd' -delete
-o
-name
'\.*.d' -delete
84 $(Q
)rm -f rv rv-static fixdep FEATURE-DUMP rv-
*