Makefile 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. #
  2. # arch/unicore32/Makefile
  3. #
  4. # This file is included by the global makefile so that you can add your own
  5. # architecture-specific flags and dependencies.
  6. #
  7. # This file is subject to the terms and conditions of the GNU General Public
  8. # License. See the file "COPYING" in the main directory of this archive
  9. # for more details.
  10. #
  11. # Copyright (C) 2002~2010 by Guan Xue-tao
  12. #
  13. ifneq ($(SUBARCH),$(ARCH))
  14. ifeq ($(CROSS_COMPILE),)
  15. CROSS_COMPILE := $(call cc-cross-prefix, unicore32-linux-)
  16. endif
  17. endif
  18. LDFLAGS_vmlinux := -p --no-undefined -X
  19. OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -S
  20. # Never generate .eh_frame
  21. KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
  22. # Never use hard float in kernel
  23. KBUILD_CFLAGS += -msoft-float
  24. ifeq ($(CONFIG_FRAME_POINTER),y)
  25. KBUILD_CFLAGS += -mno-sched-prolog
  26. endif
  27. CHECKFLAGS += -D__unicore32__
  28. head-y := arch/unicore32/kernel/head.o
  29. head-y += arch/unicore32/kernel/init_task.o
  30. core-y += arch/unicore32/kernel/
  31. core-y += arch/unicore32/mm/
  32. libs-y += arch/unicore32/lib/
  33. ASM_GENERATED_DIR := $(srctree)/arch/unicore32/include/generated
  34. LINUXINCLUDE += -I$(ASM_GENERATED_DIR)
  35. ASM_GENERIC_HEADERS := atomic.h auxvec.h
  36. ASM_GENERIC_HEADERS += bitsperlong.h bug.h bugs.h
  37. ASM_GENERIC_HEADERS += cputime.h current.h
  38. ASM_GENERIC_HEADERS += device.h div64.h
  39. ASM_GENERIC_HEADERS += emergency-restart.h errno.h
  40. ASM_GENERIC_HEADERS += fb.h fcntl.h ftrace.h
  41. ASM_GENERIC_HEADERS += hardirq.h hw_irq.h
  42. ASM_GENERIC_HEADERS += ioctl.h ioctls.h ipcbuf.h irq_regs.h
  43. ASM_GENERIC_HEADERS += kdebug.h kmap_types.h
  44. ASM_GENERIC_HEADERS += local.h
  45. ASM_GENERIC_HEADERS += mman.h module.h msgbuf.h
  46. ASM_GENERIC_HEADERS += param.h parport.h percpu.h poll.h posix_types.h
  47. ASM_GENERIC_HEADERS += resource.h
  48. ASM_GENERIC_HEADERS += scatterlist.h sections.h segment.h sembuf.h serial.h
  49. ASM_GENERIC_HEADERS += setup.h shmbuf.h shmparam.h
  50. ASM_GENERIC_HEADERS += siginfo.h signal.h sizes.h
  51. ASM_GENERIC_HEADERS += socket.h sockios.h stat.h statfs.h swab.h syscalls.h
  52. ASM_GENERIC_HEADERS += termbits.h termios.h topology.h types.h
  53. ASM_GENERIC_HEADERS += ucontext.h unaligned.h user.h
  54. ASM_GENERIC_HEADERS += vga.h
  55. ASM_GENERIC_HEADERS += xor.h
  56. archprepare:
  57. ifneq ($(ASM_GENERATED_DIR), $(wildcard $(ASM_GENERATED_DIR)))
  58. $(Q)mkdir -p $(ASM_GENERATED_DIR)/asm
  59. $(Q)$(foreach a, $(ASM_GENERIC_HEADERS), \
  60. echo '#include <asm-generic/$a>' \
  61. > $(ASM_GENERATED_DIR)/asm/$a; )
  62. endif
  63. boot := arch/unicore32/boot
  64. # Default target when executing plain make
  65. KBUILD_IMAGE := zImage
  66. all: $(KBUILD_IMAGE)
  67. zImage Image uImage: vmlinux
  68. $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
  69. MRPROPER_DIRS += $(ASM_GENERATED_DIR)
  70. archclean:
  71. $(Q)$(MAKE) $(clean)=$(boot)
  72. define archhelp
  73. echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
  74. echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
  75. echo ' uImage - U-Boot wrapped zImage'
  76. endef