Merge branch 'master' into upstream
[pandora-kernel.git] / arch / sh / Makefile
index 26d62ff..bd9b172 100644 (file)
 # for "archclean" and "archdep" for cleaning up and making dependencies for
 # this architecture
 #
-
-cflags-y                               := -mb
-cflags-$(CONFIG_CPU_LITTLE_ENDIAN)     := -ml
-
 isa-y                                  := any
 isa-$(CONFIG_SH_DSP)                   := sh
 isa-$(CONFIG_CPU_SH2)                  := sh2
@@ -38,13 +34,17 @@ isa-y                       := $(isa-y)-nofpu
 endif
 endif
 
-cflags-y       += $(call as-option,-Wa$(comma)-isa=$(isa-y),)
-
-cflags-$(CONFIG_CPU_SH2)               += -m2
-cflags-$(CONFIG_CPU_SH3)               += -m3
-cflags-$(CONFIG_CPU_SH4)               += -m4 \
+cflags-$(CONFIG_CPU_SH2)               := -m2
+cflags-$(CONFIG_CPU_SH2A)              := -m2a $(call cc-option,-m2a-nofpu,)
+cflags-$(CONFIG_CPU_SH3)               := -m3
+cflags-$(CONFIG_CPU_SH4)               := -m4 \
        $(call cc-option,-mno-implicit-fp,-m4-nofpu)
-cflags-$(CONFIG_CPU_SH4A)              += $(call cc-option,-m4a-nofpu,)
+cflags-$(CONFIG_CPU_SH4A)              := -m4a $(call cc-option,-m4a-nofpu,)
+
+cflags-$(CONFIG_CPU_BIG_ENDIAN)                += -mb
+cflags-$(CONFIG_CPU_LITTLE_ENDIAN)     += -ml
+
+cflags-y       += $(call as-option,-Wa$(comma)-isa=$(isa-y),) -ffreestanding
 
 cflags-$(CONFIG_SH_DSP)                        += -Wa,-dsp
 cflags-$(CONFIG_SH_KGDB)               += -g
@@ -59,7 +59,9 @@ OBJCOPYFLAGS  := -O binary -R .note -R .comment -R .stab -R .stabstr -S
 # never be used by anyone. Use a board-specific defconfig that has a
 # reasonable chance of being current instead.
 #
-KBUILD_DEFCONFIG := rts7751r2d_defconfig
+KBUILD_DEFCONFIG := r7780rp_defconfig
+
+KBUILD_IMAGE   := arch/sh/boot/zImage
 
 #
 # Choosing incompatible machines durings configuration will result in
@@ -92,10 +94,8 @@ machdir-$(CONFIG_SH_7300_SOLUTION_ENGINE)    := se/7300
 machdir-$(CONFIG_SH_7343_SOLUTION_ENGINE)      := se/7343
 machdir-$(CONFIG_SH_73180_SOLUTION_ENGINE)     := se/73180
 machdir-$(CONFIG_SH_HP6XX)                     := hp6xx
-machdir-$(CONFIG_SH_EC3104)                    := ec3104
 machdir-$(CONFIG_SH_SATURN)                    := saturn
 machdir-$(CONFIG_SH_DREAMCAST)                 := dreamcast
-machdir-$(CONFIG_SH_BIGSUR)                    := bigsur
 machdir-$(CONFIG_SH_MPC1211)                   := mpc1211
 machdir-$(CONFIG_SH_SH03)                      := sh03
 machdir-$(CONFIG_SH_SECUREEDGE5410)            := snapgear
@@ -109,6 +109,8 @@ machdir-$(CONFIG_SH_SH4202_MICRODEV)                := superh/microdev
 machdir-$(CONFIG_SH_LANDISK)                   := landisk
 machdir-$(CONFIG_SH_TITAN)                     := titan
 machdir-$(CONFIG_SH_SHMIN)                     := shmin
+machdir-$(CONFIG_SH_7206_SOLUTION_ENGINE)      := se/7206
+machdir-$(CONFIG_SH_7619_SOLUTION_ENGINE)      := se/7619
 machdir-$(CONFIG_SH_UNKNOWN)                   := unknown
 
 incdir-y                       := $(notdir $(machdir-y))
@@ -124,6 +126,7 @@ core-$(CONFIG_HD64465)              += arch/sh/cchips/hd6446x/hd64465/
 core-$(CONFIG_VOYAGERGX)       += arch/sh/cchips/voyagergx/
 
 cpuincdir-$(CONFIG_CPU_SH2)    := cpu-sh2
+cpuincdir-$(CONFIG_CPU_SH2A)   := cpu-sh2a
 cpuincdir-$(CONFIG_CPU_SH3)    := cpu-sh3
 cpuincdir-$(CONFIG_CPU_SH4)    := cpu-sh4
 
@@ -175,7 +178,7 @@ maketools:  include/linux/version.h FORCE
 
 all: zImage
 
-zImage: vmlinux
+zImage uImage uImage.srec vmlinux.srec: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 
 compressed: zImage
@@ -186,5 +189,8 @@ archclean:
 CLEAN_FILES += include/asm-sh/machtypes.h
 
 define archhelp
-       @echo '  zImage                    - Compressed kernel image (arch/sh/boot/zImage)'
+       @echo '* zImage                    - Compressed kernel image'
+       @echo '  vmlinux.srec              - Create an ELF S-record'
+       @echo '  uImage                    - Create a bootable image for U-Boot'
+       @echo '  uImage.srec               - Create an S-record for U-Boot'
 endef