Makefile 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #
  2. # frv/Makefile
  3. #
  4. # This file is included by the global makefile so that you can add your own
  5. # architecture-specific flags and dependencies. Remember to do have actions
  6. # for "archclean" and "archdep" for cleaning up and making dependencies for
  7. # this architecture
  8. #
  9. # This file is subject to the terms and conditions of the GNU General Public
  10. # License. See the file "COPYING" in the main directory of this archive
  11. # for more details.
  12. #
  13. # Copyright (c) 2003, 2004 Red Hat Inc.
  14. # - Written by David Howells <dhowells@redhat.com>
  15. # - Derived from arch/m68knommu/Makefile,
  16. # Copyright (c) 1999,2001 D. Jeff Dionne <jeff@lineo.ca>,
  17. # Rt-Control Inc. / Lineo, Inc.
  18. #
  19. # Copyright (C) 1998,1999 D. Jeff Dionne <jeff@uclinux.org>,
  20. # Kenneth Albanowski <kjahds@kjahds.com>,
  21. #
  22. # Based on arch/m68k/Makefile:
  23. # Copyright (C) 1994 by Hamish Macdonald
  24. #
  25. ifdef CONFIG_MMU
  26. UTS_SYSNAME = -DUTS_SYSNAME=\"Linux\"
  27. else
  28. UTS_SYSNAME = -DUTS_SYSNAME=\"uClinux\"
  29. endif
  30. KBUILD_AFLAGS_MODULE += -G0 -mlong-calls
  31. KBUILD_CFLAGS_MODULE += -G0 -mlong-calls
  32. ifdef CONFIG_GPREL_DATA_8
  33. KBUILD_CFLAGS += -G8
  34. else
  35. ifdef CONFIG_GPREL_DATA_4
  36. KBUILD_CFLAGS += -G4
  37. else
  38. ifdef CONFIG_GPREL_DATA_NONE
  39. KBUILD_CFLAGS += -G0
  40. endif
  41. endif
  42. endif
  43. #LDFLAGS_vmlinux := -Map linkmap.txt
  44. ifdef CONFIG_GC_SECTIONS
  45. KBUILD_CFLAGS += -ffunction-sections -fdata-sections
  46. endif
  47. ifndef CONFIG_FRAME_POINTER
  48. KBUILD_CFLAGS += -mno-linked-fp
  49. endif
  50. ifdef CONFIG_CPU_FR451_COMPILE
  51. KBUILD_CFLAGS += -mcpu=fr450
  52. KBUILD_AFLAGS += -mcpu=fr450
  53. else
  54. ifdef CONFIG_CPU_FR551_COMPILE
  55. KBUILD_CFLAGS += -mcpu=fr550
  56. KBUILD_AFLAGS += -mcpu=fr550
  57. else
  58. KBUILD_CFLAGS += -mcpu=fr400
  59. KBUILD_AFLAGS += -mcpu=fr400
  60. endif
  61. endif
  62. # pretend the kernel is going to run on an FR400 with no media-fp unit
  63. # - reserve CC3 for use with atomic ops
  64. # - all the extra registers are dealt with only at context switch time
  65. KBUILD_CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media
  66. KBUILD_CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2
  67. KBUILD_AFLAGS += -mno-fdpic
  68. head-y := arch/frv/kernel/head.o
  69. core-y += arch/frv/kernel/ arch/frv/mm/
  70. libs-y += arch/frv/lib/
  71. core-$(CONFIG_MB93090_MB00) += arch/frv/mb93090-mb00/
  72. all: Image
  73. Image: vmlinux
  74. $(Q)$(MAKE) $(build)=arch/frv/boot $@
  75. archclean:
  76. $(Q)$(MAKE) $(clean)=arch/frv/boot