aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/Makefile
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-07-28 19:09:44 -0400
committerPaul Mundt <lethal@linux-sh.org>2008-07-28 19:09:44 -0400
commitf15cbe6f1a4b4d9df59142fc8e4abb973302cf44 (patch)
tree774d7b11abaaf33561ab8268bf51ddd9ceb79025 /arch/sh/Makefile
parent25326277d8d1393d1c66240e6255aca780f9e3eb (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/Makefile61
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'
91LDFLAGS += -EB 91LDFLAGS += -EB
92endif 92endif
93 93
94KBUILD_CFLAGS += -pipe $(cflags-y)
95KBUILD_AFLAGS += $(cflags-y)
96 94
97head-y := arch/sh/kernel/init_task.o 95head-y := arch/sh/kernel/init_task.o
98head-$(CONFIG_SUPERH32) += arch/sh/kernel/head_32.o 96head-$(CONFIG_SUPERH32) += arch/sh/kernel/head_32.o
@@ -160,57 +158,17 @@ drivers-$(CONFIG_OPROFILE) += arch/sh/oprofile/
160 158
161boot := arch/sh/boot 159boot := arch/sh/boot
162 160
163ifneq ($(KBUILD_SRC),) 161cflags-y += -Iarch/sh/include/$(cpuincdir-y)
164incdir-prefix := $(srctree)/include/asm-sh/ 162cflags-y += $(foreach d, $(incdir-y), -Iarch/sh/include/mach-$(d))
165else
166incdir-prefix :=
167endif
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
173include/asm-sh/.cpu: $(wildcard include/config/cpu/*.h) \ 164KBUILD_CFLAGS += -pipe $(cflags-y)
174 include/config/auto.conf FORCE 165KBUILD_CPPFLAGS += $(cflags-y)
175 @echo ' SYMLINK include/asm-sh/cpu -> include/asm-sh/$(cpuincdir-y)' 166KBUILD_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
190include/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
210PHONY += maketools FORCE 168PHONY += maketools FORCE
211 169
212maketools: include/linux/version.h FORCE 170maketools: 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
215all: $(KBUILD_IMAGE) 173all: $(KBUILD_IMAGE)
216 174
@@ -219,8 +177,7 @@ zImage uImage uImage.srec vmlinux.srec: vmlinux
219 177
220compressed: zImage 178compressed: zImage
221 179
222archprepare: include/asm-sh/.cpu include/asm-sh/.mach maketools \ 180archprepare: maketools arch/sh/lib64/syscalltab.h
223 arch/sh/lib64/syscalltab.h
224 181
225archclean: 182archclean:
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
264CLEAN_FILES += arch/sh/lib64/syscalltab.h \ 221CLEAN_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