blob: 61107b68e05be1f6daac8b00cf9e963579c4f22c [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=.%): \
Sam Ravnborg5e8d7802006-07-01 09:58:02 +020011 c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) $(CFLAGS_$(basetarget).o)
Paolo 'Blaisorblade' Giarrussoccea15f2006-04-10 22:53:35 -070012$(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \
Al Viroc537b992007-03-14 09:04:51 +000013 -Dunix -D__unix__ -D__$(SUBARCH)__ $(CF)
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=.%): \
Sam Ravnborg5e8d7802006-07-01 09:58:02 +020020 c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) $(CFLAGS_$(basetarget).o)
Paolo 'Blaisorblade' Giarrusso7b12b912006-05-01 12:16:05 -070021$(UNPROFILE_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \
Al Viroc537b992007-03-14 09:04:51 +000022 -Dunix -D__unix__ -D__$(SUBARCH)__ $(CF)
Linus Torvalds1da177e2005-04-16 15:20:36 -070023
Jeff Dike42fda662007-10-16 01:26:50 -070024# The stubs can't try to call mcount or update basic block data
Paolo 'Blaisorblade' Giarrusso60b27372005-06-21 17:16:25 -070025define 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
Al Viro2b8232c2007-10-13 08:16:04 +010031subarch-y = $(addprefix ../../$(HEADER_ARCH)/,$(subarch-obj-y))
Al Virode2fe5e2006-03-31 02:30:11 -080032endif