aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/Makefile')
-rw-r--r--arch/um/Makefile25
1 files changed, 11 insertions, 14 deletions
diff --git a/arch/um/Makefile b/arch/um/Makefile
index d944c343acdb..0728def32234 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -22,10 +22,11 @@ MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared/skas
22 22
23include $(srctree)/$(ARCH_DIR)/Makefile-skas 23include $(srctree)/$(ARCH_DIR)/Makefile-skas
24 24
25ARCH_INCLUDE := -I$(srctree)/$(ARCH_DIR)/include/shared 25SHARED_HEADERS := $(ARCH_DIR)/include/shared
26ARCH_INCLUDE := -I$(srctree)/$(SHARED_HEADERS)
26ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH)/shared 27ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH)/shared
27ifneq ($(KBUILD_SRC),) 28ifneq ($(KBUILD_SRC),)
28ARCH_INCLUDE += -I$(ARCH_DIR)/include/shared # for two generated files 29ARCH_INCLUDE += -I$(SHARED_HEADERS)
29endif 30endif
30KBUILD_CPPFLAGS += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH) 31KBUILD_CPPFLAGS += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH)
31 32
@@ -85,8 +86,8 @@ endef
85 86
86KBUILD_KCONFIG := arch/um/Kconfig.$(HEADER_ARCH) 87KBUILD_KCONFIG := arch/um/Kconfig.$(HEADER_ARCH)
87 88
88archprepare: $(ARCH_DIR)/include/shared/user_constants.h 89archprepare: $(SHARED_HEADERS)/user_constants.h
89prepare: $(ARCH_DIR)/include/shared/kern_constants.h 90archprepare: $(SHARED_HEADERS)/kern_constants.h
90 91
91LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static 92LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
92LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib 93LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib
@@ -119,17 +120,13 @@ endef
119# When cleaning we don't include .config, so we don't include 120# When cleaning we don't include .config, so we don't include
120# TT or skas makefiles and don't clean skas_ptregs.h. 121# TT or skas makefiles and don't clean skas_ptregs.h.
121CLEAN_FILES += linux x.i gmon.out \ 122CLEAN_FILES += linux x.i gmon.out \
122 $(ARCH_DIR)/include/shared/user_constants.h \ 123 $(SHARED_HEADERS)/user_constants.h \
123 $(ARCH_DIR)/include/shared/kern_constants.h 124 $(SHARED_HEADERS)/kern_constants.h
124 125
125archclean: 126archclean:
126 @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \ 127 @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
127 -o -name '*.gcov' \) -type f -print | xargs rm -f 128 -o -name '*.gcov' \) -type f -print | xargs rm -f
128 129
129$(objtree)/$(ARCH_DIR)/include/shared:
130 @echo ' MKDIR $@'
131 $(Q)mkdir -p $@
132
133# Generated files 130# Generated files
134 131
135$(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s: FORCE 132$(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s: FORCE
@@ -148,11 +145,11 @@ define filechk_gen-asm-offsets
148 echo ""; ) 145 echo ""; )
149endef 146endef
150 147
151$(ARCH_DIR)/include/shared/user_constants.h: $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s 148$(SHARED_HEADERS)/user_constants.h: $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s
152 $(call filechk,gen-asm-offsets) 149 $(call filechk,gen-asm-offsets)
153 150
154$(ARCH_DIR)/include/shared/kern_constants.h: $(objtree)/$(ARCH_DIR)/include/shared 151$(SHARED_HEADERS)/kern_constants.h:
155 @echo ' SYMLINK $@' 152 $(Q)mkdir -p $(dir $@)
156 $(Q)ln -sf ../../../../include/asm/asm-offsets.h $@ 153 $(Q)echo '#include "../../../../include/asm/asm-offsets.h"' >$@
157 154
158export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH 155export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH