/arch/xtensa/Makefile

https://bitbucket.org/cresqo/cm7-p500-kernel · Makefile · 94 lines · 45 code · 28 blank · 21 comment · 2 complexity · 17d14fb90c7f96dbf17d02ced1f21acf MD5 · raw file

  1. #
  2. # This file is subject to the terms and conditions of the GNU General Public
  3. # License. See the file "COPYING" in the main directory of this archive
  4. # for more details.
  5. #
  6. # Copyright (C) 2001 - 2005 Tensilica Inc.
  7. #
  8. # This file is included by the global makefile so that you can add your own
  9. # architecture-specific flags and dependencies. Remember to do have actions
  10. # for "archclean" and "archdep" for cleaning up and making dependencies for
  11. # this architecture
  12. # Core configuration.
  13. # (Use VAR=<xtensa_config> to use another default compiler.)
  14. variant-$(CONFIG_XTENSA_VARIANT_FSF) := fsf
  15. variant-$(CONFIG_XTENSA_VARIANT_DC232B) := dc232b
  16. variant-$(CONFIG_XTENSA_VARIANT_S6000) := s6000
  17. variant-$(CONFIG_XTENSA_VARIANT_LINUX_CUSTOM) := custom
  18. VARIANT = $(variant-y)
  19. export VARIANT
  20. # Platform configuration
  21. platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000
  22. platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss
  23. platform-$(CONFIG_XTENSA_PLATFORM_S6105) := s6105
  24. PLATFORM = $(platform-y)
  25. export PLATFORM
  26. # temporarily until string.h is fixed
  27. KBUILD_CFLAGS += -ffreestanding
  28. KBUILD_CFLAGS += -pipe -mlongcalls
  29. vardirs := $(patsubst %,arch/xtensa/variants/%/,$(variant-y))
  30. plfdirs := $(patsubst %,arch/xtensa/platforms/%/,$(platform-y))
  31. ifeq ($(KBUILD_SRC),)
  32. KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(vardirs) $(plfdirs))
  33. else
  34. KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(vardirs) $(plfdirs))
  35. endif
  36. KBUILD_DEFCONFIG := iss_defconfig
  37. # ramdisk/initrd support
  38. # You need a compressed ramdisk image, named ramdisk.gz in
  39. # arch/xtensa/boot/ramdisk
  40. core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/
  41. # Test for cross compiling
  42. ifneq ($(VARIANT),)
  43. COMPILE_ARCH = $(shell uname -m)
  44. ifneq ($(COMPILE_ARCH), xtensa)
  45. ifndef CROSS_COMPILE
  46. CROSS_COMPILE = xtensa_$(VARIANT)-
  47. endif
  48. endif
  49. endif
  50. # Only build variant and/or platform if it includes a Makefile
  51. buildvar := $(shell test -a $(srctree)/arch/xtensa/variants/$(VARIANT)/Makefile && echo arch/xtensa/variants/$(VARIANT)/)
  52. buildplf := $(shell test -a $(srctree)/arch/xtensa/platforms/$(PLATFORM)/Makefile && echo arch/xtensa/platforms/$(PLATFORM)/)
  53. # Find libgcc.a
  54. LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
  55. head-y := arch/xtensa/kernel/head.o
  56. core-y += arch/xtensa/kernel/ arch/xtensa/mm/
  57. core-y += $(buildvar) $(buildplf)
  58. libs-y += arch/xtensa/lib/ $(LIBGCC)
  59. boot := arch/xtensa/boot
  60. all: zImage
  61. bzImage : zImage
  62. zImage zImage.initrd: vmlinux
  63. $(Q)$(MAKE) $(build)=$(boot) $@
  64. define archhelp
  65. @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'
  66. endef