Makefile.rules 1.1 KB

123456789101112131415161718192021222324252627
  1. # ===========================================================================
  2. # arch/um: Generic definitions
  3. # ===========================================================================
  4. USER_SINGLE_OBJS := \
  5. $(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs))
  6. USER_OBJS += $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS))
  7. USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
  8. $(USER_OBJS:.o=.%): \
  9. c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) -include user.h $(CFLAGS_$(basetarget).o)
  10. $(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \
  11. -Dunix -D__unix__ -D__$(SUBARCH)__ $(CF)
  12. # These are like USER_OBJS but filter USER_CFLAGS through unprofile instead of
  13. # using it directly.
  14. UNPROFILE_OBJS := $(foreach file,$(UNPROFILE_OBJS),$(obj)/$(file))
  15. $(UNPROFILE_OBJS:.o=.%): \
  16. c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) $(CFLAGS_$(basetarget).o)
  17. $(UNPROFILE_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \
  18. -Dunix -D__unix__ -D__$(SUBARCH)__ $(CF)
  19. # The stubs can't try to call mcount or update basic block data
  20. define unprofile
  21. $(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1)))
  22. endef