diff options
Diffstat (limited to 'arch/um/Makefile')
-rw-r--r-- | arch/um/Makefile | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/arch/um/Makefile b/arch/um/Makefile index bc070cef3ceb..2606bdaefcb6 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -18,28 +18,23 @@ core-y += $(ARCH_DIR)/kernel/ \ | |||
18 | $(ARCH_DIR)/drivers/ \ | 18 | $(ARCH_DIR)/drivers/ \ |
19 | $(ARCH_DIR)/os-$(OS)/ | 19 | $(ARCH_DIR)/os-$(OS)/ |
20 | 20 | ||
21 | # Have to precede the include because the included Makefiles reference them. | ||
22 | SYMLINK_HEADERS := archparam.h processor.h ptrace.h module.h elf.h | ||
23 | SYMLINK_HEADERS := $(foreach header,$(SYMLINK_HEADERS),$(ARCH_DIR)/include/asm/$(header)) | ||
24 | |||
25 | # XXX: The "os" symlink is only used by arch/um/include/os.h, which includes | 21 | # XXX: The "os" symlink is only used by arch/um/include/os.h, which includes |
26 | # ../os/include/file.h | 22 | # ../os/include/file.h |
27 | # | 23 | # |
28 | # These are cleaned up during mrproper. Please DO NOT fix it again, this is | 24 | # These are cleaned up during mrproper. Please DO NOT fix it again, this is |
29 | # the Correct Thing(tm) to do! | 25 | # the Correct Thing(tm) to do! |
30 | ARCH_SYMLINKS = $(ARCH_DIR)/os \ | 26 | ARCH_SYMLINKS = $(ARCH_DIR)/os $(ARCH_DIR)/include/shared/uml-config.h |
31 | $(SYMLINK_HEADERS) $(ARCH_DIR)/include/shared/uml-config.h | ||
32 | 27 | ||
33 | MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared/skas | 28 | MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared/skas |
34 | 29 | ||
35 | include $(srctree)/$(ARCH_DIR)/Makefile-skas | 30 | include $(srctree)/$(ARCH_DIR)/Makefile-skas |
36 | 31 | ||
37 | ARCH_INCLUDE := -I$(ARCH_DIR)/include/shared | 32 | ARCH_INCLUDE := -I$(srctree)/$(ARCH_DIR)/include/shared |
33 | ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH)/shared | ||
38 | ifneq ($(KBUILD_SRC),) | 34 | ifneq ($(KBUILD_SRC),) |
39 | ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared | 35 | ARCH_INCLUDE += -I$(ARCH_DIR)/include/shared # for three generated files |
40 | KBUILD_CPPFLAGS += -I$(ARCH_DIR)/include # for SYMLINK_HEADERS | ||
41 | endif | 36 | endif |
42 | ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH) # for sysdep | 37 | KBUILD_CPPFLAGS += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH) |
43 | 38 | ||
44 | # -Dvmap=kernel_vmap prevents anything from referencing the libpcap.o symbol so | 39 | # -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. | 40 | # named - it's a common symbol in libpcap, so we get a binary which crashes. |
@@ -144,15 +139,6 @@ archclean: | |||
144 | @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \ | 139 | @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \ |
145 | -o -name '*.gcov' \) -type f -print | xargs rm -f | 140 | -o -name '*.gcov' \) -type f -print | xargs rm -f |
146 | 141 | ||
147 | $(SYMLINK_HEADERS): | ||
148 | @echo ' SYMLINK $@' | ||
149 | ifneq ($(KBUILD_SRC),) | ||
150 | $(Q)mkdir -p $(objtree)/$(ARCH_DIR)/include/asm | ||
151 | $(Q)ln -fsn $(srctree)/$(ARCH_DIR)/include/asm/$(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $@ | ||
152 | else | ||
153 | $(Q)ln -sf $(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $@ | ||
154 | endif | ||
155 | |||
156 | $(objtree)/$(ARCH_DIR)/include/shared: | 142 | $(objtree)/$(ARCH_DIR)/include/shared: |
157 | @echo ' MKDIR $@' | 143 | @echo ' MKDIR $@' |
158 | $(Q)mkdir -p $@ | 144 | $(Q)mkdir -p $@ |