diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-07-28 19:09:44 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-07-28 19:09:44 -0400 |
commit | f15cbe6f1a4b4d9df59142fc8e4abb973302cf44 (patch) | |
tree | 774d7b11abaaf33561ab8268bf51ddd9ceb79025 /arch/sh/Makefile | |
parent | 25326277d8d1393d1c66240e6255aca780f9e3eb (diff) |
sh: migrate to arch/sh/include/
This follows the sparc changes a439fe51a1f8eb087c22dd24d69cebae4a3addac.
Most of the moving about was done with Sam's directions at:
http://marc.info/?l=linux-sh&m=121724823706062&w=2
with subsequent hacking and fixups entirely my fault.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/Makefile')
-rw-r--r-- | arch/sh/Makefile | 61 |
1 files changed, 8 insertions, 53 deletions
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index c627e45c4df7..fbf875628312 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile | |||
@@ -91,8 +91,6 @@ LDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64+4' | |||
91 | LDFLAGS += -EB | 91 | LDFLAGS += -EB |
92 | endif | 92 | endif |
93 | 93 | ||
94 | KBUILD_CFLAGS += -pipe $(cflags-y) | ||
95 | KBUILD_AFLAGS += $(cflags-y) | ||
96 | 94 | ||
97 | head-y := arch/sh/kernel/init_task.o | 95 | head-y := arch/sh/kernel/init_task.o |
98 | head-$(CONFIG_SUPERH32) += arch/sh/kernel/head_32.o | 96 | head-$(CONFIG_SUPERH32) += arch/sh/kernel/head_32.o |
@@ -160,57 +158,17 @@ drivers-$(CONFIG_OPROFILE) += arch/sh/oprofile/ | |||
160 | 158 | ||
161 | boot := arch/sh/boot | 159 | boot := arch/sh/boot |
162 | 160 | ||
163 | ifneq ($(KBUILD_SRC),) | 161 | cflags-y += -Iarch/sh/include/$(cpuincdir-y) |
164 | incdir-prefix := $(srctree)/include/asm-sh/ | 162 | cflags-y += $(foreach d, $(incdir-y), -Iarch/sh/include/mach-$(d)) |
165 | else | ||
166 | incdir-prefix := | ||
167 | endif | ||
168 | |||
169 | # Update machine arch and proc symlinks if something which affects | ||
170 | # them changed. We use .arch and .mach to indicate when they were | ||
171 | # updated last, otherwise make uses the target directory mtime. | ||
172 | 163 | ||
173 | include/asm-sh/.cpu: $(wildcard include/config/cpu/*.h) \ | 164 | KBUILD_CFLAGS += -pipe $(cflags-y) |
174 | include/config/auto.conf FORCE | 165 | KBUILD_CPPFLAGS += $(cflags-y) |
175 | @echo ' SYMLINK include/asm-sh/cpu -> include/asm-sh/$(cpuincdir-y)' | 166 | KBUILD_AFLAGS += $(cflags-y) |
176 | $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi | ||
177 | $(Q)ln -fsn $(incdir-prefix)$(cpuincdir-y) include/asm-sh/cpu | ||
178 | @touch $@ | ||
179 | |||
180 | # Most boards have their own mach directories. For the ones that | ||
181 | # don't, just reference the parent directory so the semantics are | ||
182 | # kept roughly the same. | ||
183 | # | ||
184 | # When multiple boards are compiled in at the same time, preference | ||
185 | # for the mach link is given to whichever has a directory for its | ||
186 | # headers. However, this is only a workaround until platforms that | ||
187 | # can live in the same kernel image back away from relying on the | ||
188 | # mach link. | ||
189 | |||
190 | include/asm-sh/.mach: $(wildcard include/config/sh/*.h) \ | ||
191 | include/config/auto.conf FORCE | ||
192 | $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi | ||
193 | $(Q)rm -f include/asm-sh/mach | ||
194 | $(Q)for i in $(incdir-y); do \ | ||
195 | if [ -d $(srctree)/include/asm-sh/$$i ]; then \ | ||
196 | echo -n ' SYMLINK include/asm-sh/mach -> '; \ | ||
197 | echo -e "include/asm-sh/$$i"; \ | ||
198 | ln -fsn $(incdir-prefix)$$i \ | ||
199 | include/asm-sh/mach; \ | ||
200 | else \ | ||
201 | if [ ! -d include/asm-sh/mach ]; then \ | ||
202 | echo -n ' SYMLINK include/asm-sh/mach -> '; \ | ||
203 | echo -e 'include/asm-sh'; \ | ||
204 | ln -fsn $(incdir-prefix)../asm-sh include/asm-sh/mach; \ | ||
205 | fi; \ | ||
206 | fi; \ | ||
207 | done | ||
208 | @touch $@ | ||
209 | 167 | ||
210 | PHONY += maketools FORCE | 168 | PHONY += maketools FORCE |
211 | 169 | ||
212 | maketools: include/linux/version.h FORCE | 170 | maketools: include/linux/version.h FORCE |
213 | $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h | 171 | $(Q)$(MAKE) $(build)=arch/sh/tools arch/sh/include/asm/machtypes.h |
214 | 172 | ||
215 | all: $(KBUILD_IMAGE) | 173 | all: $(KBUILD_IMAGE) |
216 | 174 | ||
@@ -219,8 +177,7 @@ zImage uImage uImage.srec vmlinux.srec: vmlinux | |||
219 | 177 | ||
220 | compressed: zImage | 178 | compressed: zImage |
221 | 179 | ||
222 | archprepare: include/asm-sh/.cpu include/asm-sh/.mach maketools \ | 180 | archprepare: maketools arch/sh/lib64/syscalltab.h |
223 | arch/sh/lib64/syscalltab.h | ||
224 | 181 | ||
225 | archclean: | 182 | archclean: |
226 | $(Q)$(MAKE) $(clean)=$(boot) | 183 | $(Q)$(MAKE) $(clean)=$(boot) |
@@ -262,6 +219,4 @@ arch/sh/lib64/syscalltab.h: arch/sh/kernel/syscalls_64.S | |||
262 | $(call filechk,gen-syscalltab) | 219 | $(call filechk,gen-syscalltab) |
263 | 220 | ||
264 | CLEAN_FILES += arch/sh/lib64/syscalltab.h \ | 221 | CLEAN_FILES += arch/sh/lib64/syscalltab.h \ |
265 | include/asm-sh/machtypes.h \ | 222 | arch/sh/include/asm/machtypes.h |
266 | include/asm-sh/cpu include/asm-sh/.cpu \ | ||
267 | include/asm-sh/mach include/asm-sh/.mach | ||