Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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_LINUX_CUSTOM) := custom
  17. VARIANT = $(variant-y)
  18. export VARIANT
  19. # Platform configuration
  20. platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000
  21. platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss
  22. PLATFORM = $(platform-y)
  23. export PLATFORM
  24. # temporarily until string.h is fixed
  25. KBUILD_CFLAGS += -ffreestanding
  26. KBUILD_CFLAGS += -pipe -mlongcalls
  27. KBUILD_DEFCONFIG := iss_defconfig
  28. # ramdisk/initrd support
  29. # You need a compressed ramdisk image, named ramdisk.gz in
  30. # arch/xtensa/boot/ramdisk
  31. core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/
  32. # Test for cross compiling
  33. ifneq ($(VARIANT),)
  34. COMPILE_ARCH = $(shell uname -m)
  35. ifneq ($(COMPILE_ARCH), xtensa)
  36. ifndef CROSS_COMPILE
  37. CROSS_COMPILE = xtensa_$(VARIANT)-
  38. endif
  39. endif
  40. endif
  41. #
  42. LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
  43. head-y := arch/xtensa/kernel/head.o
  44. core-y += arch/xtensa/kernel/ arch/xtensa/mm/
  45. ifneq ($(PLATFORM),)
  46. core-y += arch/xtensa/platforms/$(PLATFORM)/
  47. endif
  48. libs-y += arch/xtensa/lib/ $(LIBGCC)
  49. boot := arch/xtensa/boot
  50. archinc := include/asm-xtensa
  51. archprepare: $(archinc)/.platform
  52. # Update processor variant and platform symlinks if something which affects
  53. # them changed.
  54. $(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/auto.conf
  55. @echo ' SYMLINK $(archinc)/variant -> $(archinc)/variant-$(VARIANT)'
  56. $(Q)mkdir -p $(archinc)
  57. $(Q)ln -fsn $(srctree)/$(archinc)/variant-$(VARIANT) $(archinc)/variant
  58. @echo ' SYMLINK $(archinc)/platform -> $(archinc)/platform-$(PLATFORM)'
  59. $(Q)ln -fsn $(srctree)/$(archinc)/platform-$(PLATFORM) $(archinc)/platform
  60. @touch $@
  61. all: zImage
  62. bzImage : zImage
  63. zImage zImage.initrd: vmlinux
  64. $(Q)$(MAKE) $(build)=$(boot) $@
  65. CLEAN_FILES += arch/xtensa/vmlinux.lds \
  66. $(archinc)/platform $(archinc)/variant \
  67. $(archinc)/.platform
  68. define archhelp
  69. @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'
  70. endef