Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. LDFLAGS :=
  8. OBJCOPYFLAGS := -O binary -R .note -R .comment -S
  9. LDFLAGS_vmlinux :=
  10. KBUILD_CFLAGS += -pipe -fno-schedule-insns
  11. CFLAGS_KERNEL += -mmodel=medium
  12. CFLAGS_MODULE += -mmodel=large
  13. ifdef CONFIG_CHIP_VDEC2
  14. cflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -Wa,-bitinst
  15. aflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -O2 -Wa,-bitinst -Wa,-no-parallel
  16. else
  17. cflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -m32r2
  18. aflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -m32r2 -O2
  19. endif
  20. cflags-$(CONFIG_ISA_M32R) += -DNO_FPU
  21. aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst
  22. KBUILD_CFLAGS += $(cflags-y)
  23. KBUILD_AFLAGS += $(aflags-y)
  24. CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1
  25. head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o
  26. LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
  27. libs-y += arch/m32r/lib/ $(LIBGCC)
  28. core-y += arch/m32r/kernel/ \
  29. arch/m32r/mm/ \
  30. arch/m32r/boot/ \
  31. arch/m32r/platforms/
  32. drivers-$(CONFIG_OPROFILE) += arch/m32r/oprofile/
  33. boot := arch/m32r/boot
  34. PHONY += zImage
  35. all: zImage
  36. zImage: vmlinux
  37. $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
  38. compressed: zImage
  39. archclean:
  40. $(Q)$(MAKE) $(clean)=$(boot)
  41. define archhelp
  42. echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
  43. endef