diff options
Diffstat (limited to 'arch/sh/Makefile')
-rw-r--r-- | arch/sh/Makefile | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 26d62ff51a64..c1dbef212634 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile | |||
@@ -13,10 +13,6 @@ | |||
13 | # for "archclean" and "archdep" for cleaning up and making dependencies for | 13 | # for "archclean" and "archdep" for cleaning up and making dependencies for |
14 | # this architecture | 14 | # this architecture |
15 | # | 15 | # |
16 | |||
17 | cflags-y := -mb | ||
18 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) := -ml | ||
19 | |||
20 | isa-y := any | 16 | isa-y := any |
21 | isa-$(CONFIG_SH_DSP) := sh | 17 | isa-$(CONFIG_SH_DSP) := sh |
22 | isa-$(CONFIG_CPU_SH2) := sh2 | 18 | isa-$(CONFIG_CPU_SH2) := sh2 |
@@ -38,13 +34,16 @@ isa-y := $(isa-y)-nofpu | |||
38 | endif | 34 | endif |
39 | endif | 35 | endif |
40 | 36 | ||
41 | cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),) | 37 | cflags-$(CONFIG_CPU_SH2) := -m2 |
42 | 38 | cflags-$(CONFIG_CPU_SH3) := -m3 | |
43 | cflags-$(CONFIG_CPU_SH2) += -m2 | 39 | cflags-$(CONFIG_CPU_SH4) := -m4 \ |
44 | cflags-$(CONFIG_CPU_SH3) += -m3 | ||
45 | cflags-$(CONFIG_CPU_SH4) += -m4 \ | ||
46 | $(call cc-option,-mno-implicit-fp,-m4-nofpu) | 40 | $(call cc-option,-mno-implicit-fp,-m4-nofpu) |
47 | cflags-$(CONFIG_CPU_SH4A) += $(call cc-option,-m4a-nofpu,) | 41 | cflags-$(CONFIG_CPU_SH4A) := -m4a $(call cc-option,-m4a-nofpu,) |
42 | |||
43 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb | ||
44 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml | ||
45 | |||
46 | cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),) -ffreestanding | ||
48 | 47 | ||
49 | cflags-$(CONFIG_SH_DSP) += -Wa,-dsp | 48 | cflags-$(CONFIG_SH_DSP) += -Wa,-dsp |
50 | cflags-$(CONFIG_SH_KGDB) += -g | 49 | cflags-$(CONFIG_SH_KGDB) += -g |
@@ -59,7 +58,9 @@ OBJCOPYFLAGS := -O binary -R .note -R .comment -R .stab -R .stabstr -S | |||
59 | # never be used by anyone. Use a board-specific defconfig that has a | 58 | # never be used by anyone. Use a board-specific defconfig that has a |
60 | # reasonable chance of being current instead. | 59 | # reasonable chance of being current instead. |
61 | # | 60 | # |
62 | KBUILD_DEFCONFIG := rts7751r2d_defconfig | 61 | KBUILD_DEFCONFIG := r7780rp_defconfig |
62 | |||
63 | KBUILD_IMAGE := arch/sh/boot/zImage | ||
63 | 64 | ||
64 | # | 65 | # |
65 | # Choosing incompatible machines durings configuration will result in | 66 | # Choosing incompatible machines durings configuration will result in |
@@ -109,6 +110,8 @@ machdir-$(CONFIG_SH_SH4202_MICRODEV) := superh/microdev | |||
109 | machdir-$(CONFIG_SH_LANDISK) := landisk | 110 | machdir-$(CONFIG_SH_LANDISK) := landisk |
110 | machdir-$(CONFIG_SH_TITAN) := titan | 111 | machdir-$(CONFIG_SH_TITAN) := titan |
111 | machdir-$(CONFIG_SH_SHMIN) := shmin | 112 | machdir-$(CONFIG_SH_SHMIN) := shmin |
113 | machdir-$(CONFIG_SH_7206_SOLUTION_ENGINE) := se/7206 | ||
114 | machdir-$(CONFIG_SH_7619_SOLUTION_ENGINE) := se/7619 | ||
112 | machdir-$(CONFIG_SH_UNKNOWN) := unknown | 115 | machdir-$(CONFIG_SH_UNKNOWN) := unknown |
113 | 116 | ||
114 | incdir-y := $(notdir $(machdir-y)) | 117 | incdir-y := $(notdir $(machdir-y)) |
@@ -124,6 +127,7 @@ core-$(CONFIG_HD64465) += arch/sh/cchips/hd6446x/hd64465/ | |||
124 | core-$(CONFIG_VOYAGERGX) += arch/sh/cchips/voyagergx/ | 127 | core-$(CONFIG_VOYAGERGX) += arch/sh/cchips/voyagergx/ |
125 | 128 | ||
126 | cpuincdir-$(CONFIG_CPU_SH2) := cpu-sh2 | 129 | cpuincdir-$(CONFIG_CPU_SH2) := cpu-sh2 |
130 | cpuincdir-$(CONFIG_CPU_SH2A) := cpu-sh2a | ||
127 | cpuincdir-$(CONFIG_CPU_SH3) := cpu-sh3 | 131 | cpuincdir-$(CONFIG_CPU_SH3) := cpu-sh3 |
128 | cpuincdir-$(CONFIG_CPU_SH4) := cpu-sh4 | 132 | cpuincdir-$(CONFIG_CPU_SH4) := cpu-sh4 |
129 | 133 | ||
@@ -175,7 +179,7 @@ maketools: include/linux/version.h FORCE | |||
175 | 179 | ||
176 | all: zImage | 180 | all: zImage |
177 | 181 | ||
178 | zImage: vmlinux | 182 | zImage uImage uImage.srec vmlinux.srec: vmlinux |
179 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | 183 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
180 | 184 | ||
181 | compressed: zImage | 185 | compressed: zImage |
@@ -186,5 +190,8 @@ archclean: | |||
186 | CLEAN_FILES += include/asm-sh/machtypes.h | 190 | CLEAN_FILES += include/asm-sh/machtypes.h |
187 | 191 | ||
188 | define archhelp | 192 | define archhelp |
189 | @echo ' zImage - Compressed kernel image (arch/sh/boot/zImage)' | 193 | @echo '* zImage - Compressed kernel image' |
194 | @echo ' vmlinux.srec - Create an ELF S-record' | ||
195 | @echo ' uImage - Create a bootable image for U-Boot' | ||
196 | @echo ' uImage.srec - Create an S-record for U-Boot' | ||
190 | endef | 197 | endef |