diff options
Diffstat (limited to 'arch/cris/Makefile')
-rw-r--r-- | arch/cris/Makefile | 65 |
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 | ||
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,74 +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 | @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 | ||
102 | archclean: | 83 | archclean: |
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 | ||
107 | CLEAN_FILES += \ | 88 | CLEAN_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 | ||
114 | MRPROPER_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 | ||
122 | define archhelp | 97 | define 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)' |
125 | endef | 100 | endef |