Merge tag 'f2fs-for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk...
[linux-2.6-block.git] / arch / um / scripts / Makefile.rules
CommitLineData
b2441318 1# SPDX-License-Identifier: GPL-2.0
1da177e4
LT
2# ===========================================================================
3# arch/um: Generic definitions
4# ===========================================================================
5
2ba49175
JD
6USER_SINGLE_OBJS := \
7 $(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs))
8USER_OBJS += $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS))
1da177e4
LT
9USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
10
7b12b913 11$(USER_OBJS:.o=.%): \
9429ec96 12 c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) -include $(srctree)/include/linux/kern_levels.h -include user.h $(CFLAGS_$(basetarget).o)
2624f124 13
7b12b913
PBG
14# These are like USER_OBJS but filter USER_CFLAGS through unprofile instead of
15# using it directly.
16UNPROFILE_OBJS := $(foreach file,$(UNPROFILE_OBJS),$(obj)/$(file))
17
18$(UNPROFILE_OBJS:.o=.%): \
5e8d780d 19 c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) $(CFLAGS_$(basetarget).o)
64405360
AV
20
21$(USER_OBJS) $(UNPROFILE_OBJS): \
22 CHECKFLAGS := $(patsubst $(NOSTDINC_FLAGS),,$(CHECKFLAGS))
1da177e4 23
42fda663 24# The stubs can't try to call mcount or update basic block data
60b2737d
PBG
25define unprofile
26 $(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1)))
27endef