aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris/Makefile')
-rw-r--r--arch/cris/Makefile65
1 files changed, 20 insertions, 45 deletions
diff --git a/arch/cris/Makefile b/arch/cris/Makefile
index 22825a7bbe57..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,74 +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 @rm -rf $(SRC_ARCH)/kernel/asm-offsets.c
99 @ln -sfn ../$(SARCH)/kernel/asm-offsets.c $(SRC_ARCH)/kernel/asm-offsets.c
100 @touch $@
101 82
102archclean: 83archclean:
103 $(Q)if [ -e arch/$(ARCH)/boot ]; then \ 84 $(Q)if [ -e arch/cris/$(SARCH)/boot ]; then \
104 $(MAKE) $(clean)=arch/$(ARCH)/boot; \ 85 $(MAKE) $(clean)=arch/cris/$(SARCH)/boot; \
105 fi 86 fi
106 87
107CLEAN_FILES += \ 88CLEAN_FILES += \
108 $(MACHINE)/boot/zImage \ 89 $(MACHINE)/boot/zImage \
109 $(MACHINE)/boot/compressed/decompress.bin \ 90 $(MACHINE)/boot/compressed/decompress.bin \
110 $(MACHINE)/boot/compressed/piggy.gz \ 91 $(MACHINE)/boot/compressed/piggy.gz \
111 $(MACHINE)/boot/rescue/rescue.bin \ 92 $(MACHINE)/boot/rescue/rescue.bin
112 $(SRC_ARCH)/.links 93
113 94
114MRPROPER_FILES += \ 95# MRPROPER_FILES +=
115 $(SRC_ARCH)/drivers \
116 $(SRC_ARCH)/boot \
117 $(SRC_ARCH)/lib \
118 $(SRC_ARCH)/arch \
119 $(SRC_ARCH)/kernel/vmlinux.lds.S \
120 $(SRC_ARCH)/kernel/asm-offsets.c
121 96
122define archhelp 97define archhelp
123 echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' 98 echo '* zImage - Compressed kernel image (arch/cris/boot/zImage)'
124 echo '* Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' 99 echo '* Image - Uncompressed kernel image (arch/cris/boot/Image)'
125endef 100endef