aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/Makefile
diff options
context:
space:
mode:
authorJesper Nilsson <jesper.nilsson@axis.com>2008-10-22 17:57:53 -0400
committerJesper Nilsson <jesper.nilsson@axis.com>2008-10-31 18:37:57 -0400
commitc5ec6fb08d7806cf1a9e4fceed15f5d4a69f885e (patch)
treee3a1dca7bb4ea58907c067f592ce45391222ffc4 /arch/cris/Makefile
parent0365f707c99bf940a51c2a3ffc19f3ade2f700d4 (diff)
[CRIS] Remove links from CRIS build
Remove the links to architecture and machine dependent directories (boot, lib, drivers, arch, mach) The links were created and used mostly from the arch/cris/Makefile, so why not dispense with them altogether? Changed $(ARCH) to "cris" in Makefile, it is easier to read this way. The CRISv32 head.S common files for the kernel and compressed images needed to be modified to use ifdefs instead of using the now removed mach link. Since there are only two versions, this is not a huge loss in readability. The link to vmlinux.lds.S is also replaced with a merged version which uses ifdefs to select the correct layout. System.map before and after are identical. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Acked-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'arch/cris/Makefile')
-rw-r--r--arch/cris/Makefile61
1 files changed, 19 insertions, 42 deletions
diff --git a/arch/cris/Makefile b/arch/cris/Makefile
index 241e35bc3b59..3662cfb7b61d 100644
--- a/arch/cris/Makefile
+++ b/arch/cris/Makefile
@@ -23,7 +23,8 @@ mach-$(CONFIG_ETRAXFS) := fs
23 23
24ifneq ($(arch-y),) 24ifneq ($(arch-y),)
25SARCH := arch-$(arch-y) 25SARCH := arch-$(arch-y)
26inc := -Iarch/cris/include/arch-$(arch-y) -Iarch/cris/include/arch-$(arch-y)/arch 26inc := -Iarch/cris/include/$(SARCH)
27inc += -Iarch/cris/include/$(SARCH)/arch
27else 28else
28SARCH := 29SARCH :=
29inc := 30inc :=
@@ -52,72 +53,48 @@ KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
52KBUILD_CFLAGS += -fno-omit-frame-pointer 53KBUILD_CFLAGS += -fno-omit-frame-pointer
53endif 54endif
54 55
55head-y := arch/$(ARCH)/$(SARCH)/kernel/head.o 56head-y := arch/cris/$(SARCH)/kernel/head.o
56 57
57LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a) 58LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a)
58 59
59core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ 60core-y += arch/cris/kernel/ arch/cris/mm/
60core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/ 61core-y += arch/cris/$(SARCH)/kernel/ arch/cris/$(SARCH)/mm/
61ifdef CONFIG_ETRAX_ARCH_V32 62ifdef CONFIG_ETRAX_ARCH_V32
62core-y += arch/$(ARCH)/$(SARCH)/$(MACH)/ 63core-y += arch/cris/$(SARCH)/$(MACH)/
63endif 64endif
64drivers-y += arch/$(ARCH)/$(SARCH)/drivers/ 65drivers-y += arch/cris/$(SARCH)/drivers/
65libs-y += arch/$(ARCH)/$(SARCH)/lib/ $(LIBGCC) 66libs-y += arch/cris/$(SARCH)/lib/ $(LIBGCC)
66 67
67# cris source path 68# cris source path
68SRC_ARCH = $(srctree)/arch/$(ARCH) 69SRC_ARCH = $(srctree)/arch/cris
69# cris object files path 70# cris object files path
70OBJ_ARCH = $(objtree)/arch/$(ARCH) 71OBJ_ARCH = $(objtree)/arch/cris
71 72
72boot := arch/$(ARCH)/boot 73boot := arch/cris/$(SARCH)/boot
73MACHINE := arch/$(ARCH)/$(SARCH) 74MACHINE := arch/cris/$(SARCH)
74 75
75all: zImage 76all: zImage
76 77
77zImage Image: vmlinux 78zImage Image: vmlinux
78 $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ 79 $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
79 80
80archprepare: $(SRC_ARCH)/.links FORCE 81archprepare:
81
82# Create some links to make all tools happy
83$(SRC_ARCH)/.links:
84 @rm -rf $(SRC_ARCH)/drivers
85 @ln -sfn $(SARCH)/drivers $(SRC_ARCH)/drivers
86 @rm -rf $(SRC_ARCH)/boot
87 @ln -sfn $(SARCH)/boot $(SRC_ARCH)/boot
88 @rm -rf $(SRC_ARCH)/lib
89 @ln -sfn $(SARCH)/lib $(SRC_ARCH)/lib
90 @rm -f $(SRC_ARCH)/arch/mach
91 @rm -rf $(SRC_ARCH)/arch
92 @ln -sfn $(SARCH) $(SRC_ARCH)/arch
93ifdef CONFIG_ETRAX_ARCH_V32
94 @ln -sfn ../$(SARCH)/$(MACH) $(SRC_ARCH)/arch/mach
95endif
96 @rm -rf $(SRC_ARCH)/kernel/vmlinux.lds.S
97 @ln -sfn ../$(SARCH)/vmlinux.lds.S $(SRC_ARCH)/kernel/vmlinux.lds.S
98 @touch $@
99 82
100archclean: 83archclean:
101 $(Q)if [ -e arch/$(ARCH)/boot ]; then \ 84 $(Q)if [ -e arch/cris/$(SARCH)/boot ]; then \
102 $(MAKE) $(clean)=arch/$(ARCH)/boot; \ 85 $(MAKE) $(clean)=arch/cris/$(SARCH)/boot; \
103 fi 86 fi
104 87
105CLEAN_FILES += \ 88CLEAN_FILES += \
106 $(MACHINE)/boot/zImage \ 89 $(MACHINE)/boot/zImage \
107 $(MACHINE)/boot/compressed/decompress.bin \ 90 $(MACHINE)/boot/compressed/decompress.bin \
108 $(MACHINE)/boot/compressed/piggy.gz \ 91 $(MACHINE)/boot/compressed/piggy.gz \
109 $(MACHINE)/boot/rescue/rescue.bin \ 92 $(MACHINE)/boot/rescue/rescue.bin
110 $(SRC_ARCH)/.links
111 93
112MRPROPER_FILES += \
113 $(SRC_ARCH)/drivers \
114 $(SRC_ARCH)/boot \
115 $(SRC_ARCH)/lib \
116 $(SRC_ARCH)/arch \
117 $(SRC_ARCH)/kernel/vmlinux.lds.S
118 94
95# MRPROPER_FILES +=
119 96
120define archhelp 97define archhelp
121 echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' 98 echo '* zImage - Compressed kernel image (arch/cris/boot/zImage)'
122 echo '* Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' 99 echo '* Image - Uncompressed kernel image (arch/cris/boot/Image)'
123endef 100endef