linux/kernel/gcov/Makefile
Masahiro Yamada 3df8094727 kbuild,gcov: simplify kernel/gcov/Makefile
Kbuild descends into kernel/gcov/ directory only when
CONFIG_GCOV_KERNEL is enabled. (See kernel/Makefile)

CONFIG_GCOV_KERNEL check can be omitted in kernel/gcov/Makefile.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-01-09 17:25:44 +01:00

23 lines
444 B
Makefile

ccflags-y := -DSRCTREE='"$(srctree)"' -DOBJTREE='"$(objtree)"'
# if-lt
# Usage VAR := $(call if-lt, $(a), $(b))
# Returns 1 if (a < b)
if-lt = $(shell [ $(1) -lt $(2) ] && echo 1)
ifeq ($(CONFIG_GCOV_FORMAT_3_4),y)
cc-ver := 0304
else ifeq ($(CONFIG_GCOV_FORMAT_4_7),y)
cc-ver := 0407
else
cc-ver := $(cc-version)
endif
obj-y := base.o fs.o
ifeq ($(call if-lt, $(cc-ver), 0407),1)
obj-y += gcc_3_4.o
else
obj-y += gcc_4_7.o
endif