diff options
Diffstat (limited to 'arch/um/Makefile')
-rw-r--r-- | arch/um/Makefile | 51 |
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! |
31 | ARCH_SYMLINKS = include/asm-um/arch $(ARCH_DIR)/include/sysdep $(ARCH_DIR)/os \ | 31 | ARCH_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 | ||
34 | MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/skas | 34 | MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared/skas |
35 | 35 | ||
36 | include $(srctree)/$(ARCH_DIR)/Makefile-skas | 36 | include $(srctree)/$(ARCH_DIR)/Makefile-skas |
37 | 37 | ||
38 | ARCH_INCLUDE := -I$(ARCH_DIR)/include | 38 | ARCH_INCLUDE := -I$(ARCH_DIR)/include/shared |
39 | ifneq ($(KBUILD_SRC),) | 39 | ifneq ($(KBUILD_SRC),) |
40 | ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include | 40 | ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared |
41 | endif | 41 | endif |
42 | SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH) | 42 | SYS_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 | |||
96 | ifneq ($(KBUILD_SRC),) | 96 | ifneq ($(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) |
98 | else | 98 | else |
99 | $(shell cd $(ARCH_DIR) && ln -sf Kconfig.$(SUBARCH) Kconfig.arch) | 99 | $(shell ln -fsn Kconfig.$(SUBARCH) $(ARCH_DIR)/Kconfig.arch) |
100 | endif | 100 | endif |
101 | 101 | ||
102 | archprepare: $(ARCH_SYMLINKS) $(ARCH_DIR)/include/user_constants.h | 102 | archprepare: $(ARCH_SYMLINKS) $(ARCH_DIR)/include/shared/user_constants.h |
103 | prepare: $(ARCH_DIR)/include/kern_constants.h | 103 | prepare: $(ARCH_DIR)/include/shared/kern_constants.h |
104 | 104 | ||
105 | LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static | 105 | LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static |
106 | LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib | 106 | LINK-$(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. |
135 | CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/include/uml-config.h \ | 135 | CLEAN_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 | ||
139 | MRPROPER_FILES += $(ARCH_SYMLINKS) | 139 | MRPROPER_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 $@) $@ |
150 | else | 150 | else |
151 | $(Q)cd $(srctree)/$(dir $@) ; \ | 151 | $(Q)ln -sf $(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $@ |
152 | ln -sf $(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $(notdir $@) | ||
153 | endif | 152 | endif |
154 | 153 | ||
155 | include/asm-um/arch: | 154 | include/asm-um/arch: |
156 | @echo ' SYMLINK $@' | 155 | @echo ' SYMLINK $@' |
157 | ifneq ($(KBUILD_SRC),) | 156 | ifneq ($(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) $@ |
160 | else | 159 | else |
161 | $(Q)cd $(srctree)/include/asm-um && ln -fsn ../asm-$(HEADER_ARCH) arch | 160 | $(Q)ln -fsn ../asm-$(HEADER_ARCH) $@ |
162 | endif | 161 | endif |
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 $@' |
170 | ifneq ($(KBUILD_SRC),) | 169 | ifneq ($(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) $@ |
172 | else | 171 | else |
173 | $(Q)cd $(ARCH_DIR)/include && ln -fsn sysdep-$(SUBARCH) sysdep | 172 | $(Q)ln -fsn sysdep-$(SUBARCH) $@ |
174 | endif | 173 | endif |
175 | 174 | ||
176 | $(ARCH_DIR)/os: | 175 | $(ARCH_DIR)/os: |
177 | @echo ' SYMLINK $@' | 176 | @echo ' SYMLINK $@' |
178 | ifneq ($(KBUILD_SRC),) | 177 | ifneq ($(KBUILD_SRC),) |
179 | $(Q)ln -fsn $(srctree)/$(ARCH_DIR)/os-$(OS) $(ARCH_DIR)/os | 178 | $(Q)ln -fsn $(srctree)/$(ARCH_DIR)/os-$(OS) $@ |
180 | else | 179 | else |
181 | $(Q)cd $(ARCH_DIR) && ln -fsn os-$(OS) os | 180 | $(Q)ln -fsn os-$(OS) $@ |
182 | endif | 181 | endif |
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/' |
187 | endef | 186 | endef |
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 ""; ) |
206 | endef | 205 | endef |
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 | ||
215 | export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH | 214 | export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH |