Makefile.rules 1.2 KB
Newer Older
L
Linus Torvalds 已提交
1 2 3 4
# ===========================================================================
# arch/um: Generic definitions
# ===========================================================================

J
Jeff Dike 已提交
5 6 7
USER_SINGLE_OBJS := \
	$(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs))
USER_OBJS += $(filter %_user.o,$(obj-y) $(obj-m)  $(USER_SINGLE_OBJS))
L
Linus Torvalds 已提交
8 9
USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))

10
$(USER_OBJS:.o=.%): \
11
	c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) -include user.h $(CFLAGS_$(basetarget).o)
12
$(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \
13
	-Dunix -D__unix__ -D__$(SUBARCH)__ $(CF)
14

15 16 17 18 19
# These are like USER_OBJS but filter USER_CFLAGS through unprofile instead of
# using it directly.
UNPROFILE_OBJS := $(foreach file,$(UNPROFILE_OBJS),$(obj)/$(file))

$(UNPROFILE_OBJS:.o=.%): \
20
	c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) $(CFLAGS_$(basetarget).o)
21
$(UNPROFILE_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \
22
	-Dunix -D__unix__ -D__$(SUBARCH)__ $(CF)
L
Linus Torvalds 已提交
23

J
Jeff Dike 已提交
24
# The stubs can't try to call mcount or update basic block data
25 26 27 28
define unprofile
	$(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1)))
endef

29 30
ifdef subarch-obj-y
obj-y += subarch.o
31
subarch-y = $(addprefix ../../$(HEADER_ARCH)/,$(subarch-obj-y))
32
endif