blob: 1347dc6d521828508f525a1b9f7660e133c8f879 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001# ===========================================================================
2# arch/um: Generic definitions
3# ===========================================================================
4
Jeff Dike2ba49172005-05-05 16:15:33 -07005USER_SINGLE_OBJS := \
6 $(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs))
7USER_OBJS += $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS))
Linus Torvalds1da177e2005-04-16 15:20:36 -07008USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
9
Paolo 'Blaisorblade' Giarrusso7b12b912006-05-01 12:16:05 -070010$(USER_OBJS:.o=.%): \
11 c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) $(CFLAGS_$(*F).o)
Paolo 'Blaisorblade' Giarrussoccea15f2006-04-10 22:53:35 -070012$(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \
13 -Dunix -D__unix__ -D__$(SUBARCH)__
viro@ZenIV.linux.org.uk2624f122005-09-09 17:14:12 +010014
Paolo 'Blaisorblade' Giarrusso7b12b912006-05-01 12:16:05 -070015# These are like USER_OBJS but filter USER_CFLAGS through unprofile instead of
16# using it directly.
17UNPROFILE_OBJS := $(foreach file,$(UNPROFILE_OBJS),$(obj)/$(file))
18
19$(UNPROFILE_OBJS:.o=.%): \
20 c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) $(CFLAGS_$(*F).o)
21$(UNPROFILE_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \
22 -Dunix -D__unix__ -D__$(SUBARCH)__
Linus Torvalds1da177e2005-04-16 15:20:36 -070023
Paolo 'Blaisorblade' Giarrusso60b27372005-06-21 17:16:25 -070024# The stubs and unmap.o can't try to call mcount or update basic block data
25define unprofile
26 $(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1)))
27endef
28
Al Virode2fe5e2006-03-31 02:30:11 -080029ifdef subarch-obj-y
30obj-y += subarch.o
31subarch-y = $(addprefix ../../$(SUBARCH)/,$(subarch-obj-y))
32endif