diff options
author | Jesper Nilsson <jesper.nilsson@axis.com> | 2008-10-22 17:57:53 -0400 |
---|---|---|
committer | Jesper Nilsson <jesper.nilsson@axis.com> | 2008-10-31 18:37:57 -0400 |
commit | c5ec6fb08d7806cf1a9e4fceed15f5d4a69f885e (patch) | |
tree | e3a1dca7bb4ea58907c067f592ce45391222ffc4 /arch/cris/Makefile | |
parent | 0365f707c99bf940a51c2a3ffc19f3ade2f700d4 (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/Makefile | 61 |
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 | ||
24 | ifneq ($(arch-y),) | 24 | ifneq ($(arch-y),) |
25 | SARCH := arch-$(arch-y) | 25 | SARCH := arch-$(arch-y) |
26 | inc := -Iarch/cris/include/arch-$(arch-y) -Iarch/cris/include/arch-$(arch-y)/arch | 26 | inc := -Iarch/cris/include/$(SARCH) |
27 | inc += -Iarch/cris/include/$(SARCH)/arch | ||
27 | else | 28 | else |
28 | SARCH := | 29 | SARCH := |
29 | inc := | 30 | inc := |
@@ -52,72 +53,48 @@ KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g | |||
52 | KBUILD_CFLAGS += -fno-omit-frame-pointer | 53 | KBUILD_CFLAGS += -fno-omit-frame-pointer |
53 | endif | 54 | endif |
54 | 55 | ||
55 | head-y := arch/$(ARCH)/$(SARCH)/kernel/head.o | 56 | head-y := arch/cris/$(SARCH)/kernel/head.o |
56 | 57 | ||
57 | LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a) | 58 | LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a) |
58 | 59 | ||
59 | core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ | 60 | core-y += arch/cris/kernel/ arch/cris/mm/ |
60 | core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/ | 61 | core-y += arch/cris/$(SARCH)/kernel/ arch/cris/$(SARCH)/mm/ |
61 | ifdef CONFIG_ETRAX_ARCH_V32 | 62 | ifdef CONFIG_ETRAX_ARCH_V32 |
62 | core-y += arch/$(ARCH)/$(SARCH)/$(MACH)/ | 63 | core-y += arch/cris/$(SARCH)/$(MACH)/ |
63 | endif | 64 | endif |
64 | drivers-y += arch/$(ARCH)/$(SARCH)/drivers/ | 65 | drivers-y += arch/cris/$(SARCH)/drivers/ |
65 | libs-y += arch/$(ARCH)/$(SARCH)/lib/ $(LIBGCC) | 66 | libs-y += arch/cris/$(SARCH)/lib/ $(LIBGCC) |
66 | 67 | ||
67 | # cris source path | 68 | # cris source path |
68 | SRC_ARCH = $(srctree)/arch/$(ARCH) | 69 | SRC_ARCH = $(srctree)/arch/cris |
69 | # cris object files path | 70 | # cris object files path |
70 | OBJ_ARCH = $(objtree)/arch/$(ARCH) | 71 | OBJ_ARCH = $(objtree)/arch/cris |
71 | 72 | ||
72 | boot := arch/$(ARCH)/boot | 73 | boot := arch/cris/$(SARCH)/boot |
73 | MACHINE := arch/$(ARCH)/$(SARCH) | 74 | MACHINE := arch/cris/$(SARCH) |
74 | 75 | ||
75 | all: zImage | 76 | all: zImage |
76 | 77 | ||
77 | zImage Image: vmlinux | 78 | zImage Image: vmlinux |
78 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ | 79 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ |
79 | 80 | ||
80 | archprepare: $(SRC_ARCH)/.links FORCE | 81 | archprepare: |
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 | ||
93 | ifdef CONFIG_ETRAX_ARCH_V32 | ||
94 | @ln -sfn ../$(SARCH)/$(MACH) $(SRC_ARCH)/arch/mach | ||
95 | endif | ||
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 | ||
100 | archclean: | 83 | archclean: |
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 | ||
105 | CLEAN_FILES += \ | 88 | CLEAN_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 | ||
112 | MRPROPER_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 | ||
120 | define archhelp | 97 | define 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)' |
123 | endef | 100 | endef |