aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/Makefile
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-08-17 13:48:37 -0400
committerH. Peter Anvin <hpa@zytor.com>2008-10-23 01:55:19 -0400
commit8569c9140bd41089f9b6be8837ca421102714a90 (patch)
treecd289b322b215fe2ca2530aa320febfd99388d7f /arch/um/Makefile
parent2515ddc6db8eb49a79f0fe5e67ff09ac7c81eab4 (diff)
x86, um: take arch/um/include/* out of the way
We can't just plop asm/* into it - userland helpers are built with it in search path and seeing asm/* show up there suddenly would be a bad idea. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/um/Makefile')
-rw-r--r--arch/um/Makefile51
1 files changed, 25 insertions, 26 deletions
diff --git a/arch/um/Makefile b/arch/um/Makefile
index ca40397017b9..88c5b0a52777 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -28,18 +28,18 @@ SYMLINK_HEADERS := $(foreach header,$(SYMLINK_HEADERS),include/asm-um/$(header))
28# 28#
29# These are cleaned up during mrproper. Please DO NOT fix it again, this is 29# These are cleaned up during mrproper. Please DO NOT fix it again, this is
30# the Correct Thing(tm) to do! 30# the Correct Thing(tm) to do!
31ARCH_SYMLINKS = include/asm-um/arch $(ARCH_DIR)/include/sysdep $(ARCH_DIR)/os \ 31ARCH_SYMLINKS = include/asm-um/arch $(ARCH_DIR)/include/shared/sysdep $(ARCH_DIR)/os \
32 $(SYMLINK_HEADERS) $(ARCH_DIR)/include/uml-config.h 32 $(SYMLINK_HEADERS) $(ARCH_DIR)/include/shared/uml-config.h
33 33
34MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/skas 34MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared/skas
35 35
36include $(srctree)/$(ARCH_DIR)/Makefile-skas 36include $(srctree)/$(ARCH_DIR)/Makefile-skas
37 37
38ARCH_INCLUDE := -I$(ARCH_DIR)/include 38ARCH_INCLUDE := -I$(ARCH_DIR)/include/shared
39ifneq ($(KBUILD_SRC),) 39ifneq ($(KBUILD_SRC),)
40ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include 40ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared
41endif 41endif
42SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH) 42SYS_DIR := $(ARCH_DIR)/include/shared/sysdep-$(SUBARCH)
43 43
44# -Dvmap=kernel_vmap prevents anything from referencing the libpcap.o symbol so 44# -Dvmap=kernel_vmap prevents anything from referencing the libpcap.o symbol so
45# named - it's a common symbol in libpcap, so we get a binary which crashes. 45# named - it's a common symbol in libpcap, so we get a binary which crashes.
@@ -96,11 +96,11 @@ endef
96ifneq ($(KBUILD_SRC),) 96ifneq ($(KBUILD_SRC),)
97$(shell mkdir -p $(ARCH_DIR) && ln -fsn $(srctree)/$(ARCH_DIR)/Kconfig.$(SUBARCH) $(ARCH_DIR)/Kconfig.arch) 97$(shell mkdir -p $(ARCH_DIR) && ln -fsn $(srctree)/$(ARCH_DIR)/Kconfig.$(SUBARCH) $(ARCH_DIR)/Kconfig.arch)
98else 98else
99$(shell cd $(ARCH_DIR) && ln -sf Kconfig.$(SUBARCH) Kconfig.arch) 99$(shell ln -fsn Kconfig.$(SUBARCH) $(ARCH_DIR)/Kconfig.arch)
100endif 100endif
101 101
102archprepare: $(ARCH_SYMLINKS) $(ARCH_DIR)/include/user_constants.h 102archprepare: $(ARCH_SYMLINKS) $(ARCH_DIR)/include/shared/user_constants.h
103prepare: $(ARCH_DIR)/include/kern_constants.h 103prepare: $(ARCH_DIR)/include/shared/kern_constants.h
104 104
105LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static 105LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
106LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib 106LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib
@@ -132,9 +132,9 @@ endef
132 132
133# When cleaning we don't include .config, so we don't include 133# When cleaning we don't include .config, so we don't include
134# TT or skas makefiles and don't clean skas_ptregs.h. 134# TT or skas makefiles and don't clean skas_ptregs.h.
135CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/include/uml-config.h \ 135CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/include/shared/uml-config.h \
136 $(ARCH_DIR)/include/user_constants.h \ 136 $(ARCH_DIR)/include/shared/user_constants.h \
137 $(ARCH_DIR)/include/kern_constants.h $(ARCH_DIR)/Kconfig.arch 137 $(ARCH_DIR)/include/shared/kern_constants.h $(ARCH_DIR)/Kconfig.arch
138 138
139MRPROPER_FILES += $(ARCH_SYMLINKS) 139MRPROPER_FILES += $(ARCH_SYMLINKS)
140 140
@@ -148,37 +148,36 @@ ifneq ($(KBUILD_SRC),)
148 $(Q)mkdir -p $(objtree)/include/asm-um 148 $(Q)mkdir -p $(objtree)/include/asm-um
149 $(Q)ln -fsn $(srctree)/include/asm-um/$(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $@ 149 $(Q)ln -fsn $(srctree)/include/asm-um/$(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $@
150else 150else
151 $(Q)cd $(srctree)/$(dir $@) ; \ 151 $(Q)ln -sf $(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $@
152 ln -sf $(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $(notdir $@)
153endif 152endif
154 153
155include/asm-um/arch: 154include/asm-um/arch:
156 @echo ' SYMLINK $@' 155 @echo ' SYMLINK $@'
157ifneq ($(KBUILD_SRC),) 156ifneq ($(KBUILD_SRC),)
158 $(Q)mkdir -p $(objtree)/include/asm-um 157 $(Q)mkdir -p $(objtree)/include/asm-um
159 $(Q)ln -fsn $(srctree)/include/asm-$(HEADER_ARCH) include/asm-um/arch 158 $(Q)ln -fsn $(srctree)/include/asm-$(HEADER_ARCH) $@
160else 159else
161 $(Q)cd $(srctree)/include/asm-um && ln -fsn ../asm-$(HEADER_ARCH) arch 160 $(Q)ln -fsn ../asm-$(HEADER_ARCH) $@
162endif 161endif
163 162
164$(objtree)/$(ARCH_DIR)/include: 163$(objtree)/$(ARCH_DIR)/include/shared:
165 @echo ' MKDIR $@' 164 @echo ' MKDIR $@'
166 $(Q)mkdir -p $@ 165 $(Q)mkdir -p $@
167 166
168$(ARCH_DIR)/include/sysdep: $(objtree)/$(ARCH_DIR)/include 167$(ARCH_DIR)/include/shared/sysdep: $(objtree)/$(ARCH_DIR)/include/shared
169 @echo ' SYMLINK $@' 168 @echo ' SYMLINK $@'
170ifneq ($(KBUILD_SRC),) 169ifneq ($(KBUILD_SRC),)
171 $(Q)ln -fsn $(srctree)/$(ARCH_DIR)/include/sysdep-$(SUBARCH) $(ARCH_DIR)/include/sysdep 170 $(Q)ln -fsn $(srctree)/$(ARCH_DIR)/include/shared/sysdep-$(SUBARCH) $@
172else 171else
173 $(Q)cd $(ARCH_DIR)/include && ln -fsn sysdep-$(SUBARCH) sysdep 172 $(Q)ln -fsn sysdep-$(SUBARCH) $@
174endif 173endif
175 174
176$(ARCH_DIR)/os: 175$(ARCH_DIR)/os:
177 @echo ' SYMLINK $@' 176 @echo ' SYMLINK $@'
178ifneq ($(KBUILD_SRC),) 177ifneq ($(KBUILD_SRC),)
179 $(Q)ln -fsn $(srctree)/$(ARCH_DIR)/os-$(OS) $(ARCH_DIR)/os 178 $(Q)ln -fsn $(srctree)/$(ARCH_DIR)/os-$(OS) $@
180else 179else
181 $(Q)cd $(ARCH_DIR) && ln -fsn os-$(OS) os 180 $(Q)ln -fsn os-$(OS) $@
182endif 181endif
183 182
184# Generated files 183# Generated files
@@ -186,7 +185,7 @@ define filechk_umlconfig
186 sed 's/ CONFIG/ UML_CONFIG/' 185 sed 's/ CONFIG/ UML_CONFIG/'
187endef 186endef
188 187
189$(ARCH_DIR)/include/uml-config.h : include/linux/autoconf.h 188$(ARCH_DIR)/include/shared/uml-config.h : include/linux/autoconf.h
190 $(call filechk,umlconfig) 189 $(call filechk,umlconfig)
191 190
192$(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s: FORCE 191$(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s: FORCE
@@ -205,11 +204,11 @@ define filechk_gen-asm-offsets
205 echo ""; ) 204 echo ""; )
206endef 205endef
207 206
208$(ARCH_DIR)/include/user_constants.h: $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s 207$(ARCH_DIR)/include/shared/user_constants.h: $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s
209 $(call filechk,gen-asm-offsets) 208 $(call filechk,gen-asm-offsets)
210 209
211$(ARCH_DIR)/include/kern_constants.h: $(objtree)/$(ARCH_DIR)/include 210$(ARCH_DIR)/include/shared/kern_constants.h: $(objtree)/$(ARCH_DIR)/include/shared
212 @echo ' SYMLINK $@' 211 @echo ' SYMLINK $@'
213 $(Q)ln -sf ../../../include/asm-um/asm-offsets.h $@ 212 $(Q)ln -sf ../../../../include/asm-um/asm-offsets.h $@
214 213
215export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH 214export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH