Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #
  2. # m32r/Makefile
  3. #
  4. # This file is included by the global makefile so that you can add your own
  5. # architecture-specific flags and dependencies.
  6. #
  7. KBUILD_DEFCONFIG := m32700ut.smp_defconfig
  8. LDFLAGS :=
  9. OBJCOPYFLAGS := -O binary -R .note -R .comment -S
  10. LDFLAGS_vmlinux :=
  11. KBUILD_CFLAGS += -pipe -fno-schedule-insns
  12. KBUILD_CFLAGS_KERNEL += -mmodel=medium
  13. KBUILD_CFLAGS_MODULE += -mmodel=large
  14. ifdef CONFIG_CHIP_VDEC2
  15. cflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -Wa,-bitinst
  16. aflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -O2 -Wa,-bitinst -Wa,-no-parallel
  17. else
  18. cflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -m32r2
  19. aflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -m32r2 -O2
  20. endif
  21. cflags-$(CONFIG_ISA_M32R) += -DNO_FPU
  22. aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst
  23. KBUILD_CFLAGS += $(cflags-y)
  24. KBUILD_AFLAGS += $(aflags-y)
  25. CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1
  26. head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o
  27. LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
  28. libs-y += arch/m32r/lib/ $(LIBGCC)
  29. core-y += arch/m32r/kernel/ \
  30. arch/m32r/mm/ \
  31. arch/m32r/boot/ \
  32. arch/m32r/platforms/
  33. drivers-$(CONFIG_OPROFILE) += arch/m32r/oprofile/
  34. boot := arch/m32r/boot
  35. PHONY += zImage
  36. all: zImage
  37. zImage: vmlinux
  38. $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
  39. compressed: zImage
  40. archclean:
  41. $(Q)$(MAKE) $(clean)=$(boot)
  42. define archhelp
  43. echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
  44. endef