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=.%): \ |
Al Viro | 078073a | 2011-08-18 20:01:29 +0100 | [diff] [blame] | 11 | c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) -include user.h $(CFLAGS_$(basetarget).o) |
viro@ZenIV.linux.org.uk | 2624f12 | 2005-09-09 17:14:12 +0100 | [diff] [blame] | 12 | |
Paolo 'Blaisorblade' Giarrusso | 7b12b91 | 2006-05-01 12:16:05 -0700 | [diff] [blame] | 13 | # These are like USER_OBJS but filter USER_CFLAGS through unprofile instead of |
| 14 | # using it directly. |
| 15 | UNPROFILE_OBJS := $(foreach file,$(UNPROFILE_OBJS),$(obj)/$(file)) |
| 16 | |
| 17 | $(UNPROFILE_OBJS:.o=.%): \ |
Sam Ravnborg | 5e8d780 | 2006-07-01 09:58:02 +0200 | [diff] [blame] | 18 | c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) $(CFLAGS_$(basetarget).o) |
Al Viro | 6440536 | 2012-02-11 03:01:34 -0500 | [diff] [blame] | 19 | |
| 20 | $(USER_OBJS) $(UNPROFILE_OBJS): \ |
| 21 | CHECKFLAGS := $(patsubst $(NOSTDINC_FLAGS),,$(CHECKFLAGS)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | |
Jeff Dike | 42fda66 | 2007-10-16 01:26:50 -0700 | [diff] [blame] | 23 | # 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] | 24 | define unprofile |
| 25 | $(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1))) |
| 26 | endef |