| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | # =========================================================================== | 
|  | 2 | # arch/um: Generic definitions | 
|  | 3 | # =========================================================================== | 
|  | 4 |  | 
| Jeff Dike | 2ba4917 | 2005-05-05 16:15:33 -0700 | [diff] [blame] | 5 | USER_SINGLE_OBJS := \ | 
|  | 6 | $(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs)) | 
|  | 7 | USER_OBJS += $(filter %_user.o,$(obj-y) $(obj-m)  $(USER_SINGLE_OBJS)) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) | 
|  | 9 |  | 
| Paolo 'Blaisorblade' Giarrusso | 7b12b91 | 2006-05-01 12:16:05 -0700 | [diff] [blame] | 10 | $(USER_OBJS:.o=.%): \ | 
| Sam Ravnborg | 5e8d780 | 2006-07-01 09:58:02 +0200 | [diff] [blame] | 11 | c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) $(CFLAGS_$(basetarget).o) | 
| Paolo 'Blaisorblade' Giarrusso | ccea15f | 2006-04-10 22:53:35 -0700 | [diff] [blame] | 12 | $(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \ | 
| Al Viro | c537b99 | 2007-03-14 09:04:51 +0000 | [diff] [blame] | 13 | -Dunix -D__unix__ -D__$(SUBARCH)__ $(CF) | 
| viro@ZenIV.linux.org.uk | 2624f12 | 2005-09-09 17:14:12 +0100 | [diff] [blame] | 14 |  | 
| Paolo 'Blaisorblade' Giarrusso | 7b12b91 | 2006-05-01 12:16:05 -0700 | [diff] [blame] | 15 | # These are like USER_OBJS but filter USER_CFLAGS through unprofile instead of | 
|  | 16 | # using it directly. | 
|  | 17 | UNPROFILE_OBJS := $(foreach file,$(UNPROFILE_OBJS),$(obj)/$(file)) | 
|  | 18 |  | 
|  | 19 | $(UNPROFILE_OBJS:.o=.%): \ | 
| Sam Ravnborg | 5e8d780 | 2006-07-01 09:58:02 +0200 | [diff] [blame] | 20 | c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) $(CFLAGS_$(basetarget).o) | 
| Paolo 'Blaisorblade' Giarrusso | 7b12b91 | 2006-05-01 12:16:05 -0700 | [diff] [blame] | 21 | $(UNPROFILE_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \ | 
| Al Viro | c537b99 | 2007-03-14 09:04:51 +0000 | [diff] [blame] | 22 | -Dunix -D__unix__ -D__$(SUBARCH)__ $(CF) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 |  | 
| Jeff Dike | 42fda66 | 2007-10-16 01:26:50 -0700 | [diff] [blame] | 24 | # The stubs can't try to call mcount or update basic block data | 
| Paolo 'Blaisorblade' Giarrusso | 60b2737 | 2005-06-21 17:16:25 -0700 | [diff] [blame] | 25 | define unprofile | 
|  | 26 | $(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1))) | 
|  | 27 | endef | 
|  | 28 |  | 
| Al Viro | de2fe5e | 2006-03-31 02:30:11 -0800 | [diff] [blame] | 29 | ifdef subarch-obj-y | 
|  | 30 | obj-y += subarch.o | 
| Al Viro | 2b8232c | 2007-10-13 08:16:04 +0100 | [diff] [blame] | 31 | subarch-y = $(addprefix ../../$(HEADER_ARCH)/,$(subarch-obj-y)) | 
| Al Viro | de2fe5e | 2006-03-31 02:30:11 -0800 | [diff] [blame] | 32 | endif |