/arch/frv/Makefile

https://bitbucket.org/thekraven/iscream_thunderc-2.6.35 · Makefile · 115 lines · 64 code · 19 blank · 32 comment · 0 complexity · 31a20a26b8e4929b6ceb07983e8f60cb MD5 · raw file

  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. CCSPECS := $(shell $(CC) -v 2>&1 | grep "^Reading specs from " | head -1 | cut -c20-)
  26. CCDIR := $(strip $(patsubst %/specs,%,$(CCSPECS)))
  27. CPUCLASS := fr400
  28. # test for cross compiling
  29. COMPILE_ARCH = $(shell uname -m)
  30. ifdef CONFIG_MMU
  31. UTS_SYSNAME = -DUTS_SYSNAME=\"Linux\"
  32. else
  33. UTS_SYSNAME = -DUTS_SYSNAME=\"uClinux\"
  34. endif
  35. ARCHMODFLAGS += -G0 -mlong-calls
  36. ifdef CONFIG_GPREL_DATA_8
  37. KBUILD_CFLAGS += -G8
  38. else
  39. ifdef CONFIG_GPREL_DATA_4
  40. KBUILD_CFLAGS += -G4
  41. else
  42. ifdef CONFIG_GPREL_DATA_NONE
  43. KBUILD_CFLAGS += -G0
  44. endif
  45. endif
  46. endif
  47. #LDFLAGS_vmlinux := -Map linkmap.txt
  48. ifdef CONFIG_GC_SECTIONS
  49. KBUILD_CFLAGS += -ffunction-sections -fdata-sections
  50. LINKFLAGS += --gc-sections
  51. endif
  52. ifndef CONFIG_FRAME_POINTER
  53. KBUILD_CFLAGS += -mno-linked-fp
  54. endif
  55. ifdef CONFIG_CPU_FR451_COMPILE
  56. KBUILD_CFLAGS += -mcpu=fr450
  57. KBUILD_AFLAGS += -mcpu=fr450
  58. ASFLAGS += -mcpu=fr450
  59. else
  60. ifdef CONFIG_CPU_FR551_COMPILE
  61. KBUILD_CFLAGS += -mcpu=fr550
  62. KBUILD_AFLAGS += -mcpu=fr550
  63. ASFLAGS += -mcpu=fr550
  64. else
  65. KBUILD_CFLAGS += -mcpu=fr400
  66. KBUILD_AFLAGS += -mcpu=fr400
  67. ASFLAGS += -mcpu=fr400
  68. endif
  69. endif
  70. # pretend the kernel is going to run on an FR400 with no media-fp unit
  71. # - reserve CC3 for use with atomic ops
  72. # - all the extra registers are dealt with only at context switch time
  73. KBUILD_CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media
  74. KBUILD_CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2
  75. KBUILD_AFLAGS += -mno-fdpic
  76. ASFLAGS += -mno-fdpic
  77. # make sure the .S files get compiled with debug info
  78. # and disable optimisations that are unhelpful whilst debugging
  79. ifdef CONFIG_DEBUG_INFO
  80. #KBUILD_CFLAGS += -O1
  81. KBUILD_AFLAGS += -Wa,--gdwarf2
  82. ASFLAGS += -Wa,--gdwarf2
  83. endif
  84. head-y := arch/frv/kernel/head.o arch/frv/kernel/init_task.o
  85. core-y += arch/frv/kernel/ arch/frv/mm/
  86. libs-y += arch/frv/lib/
  87. core-$(CONFIG_MB93090_MB00) += arch/frv/mb93090-mb00/
  88. all: Image
  89. Image: vmlinux
  90. $(Q)$(MAKE) $(build)=arch/frv/boot $@
  91. bootstrap:
  92. $(Q)$(MAKEBOOT) bootstrap
  93. archclean:
  94. $(Q)$(MAKE) $(clean)=arch/frv/boot
  95. archdep: scripts/mkdep symlinks
  96. $(Q)$(MAKE) $(build)=arch/frv/boot dep