Makefile 2.4 KB

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