Makefile
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:2k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. # This file is included by the global makefile so that you can add your own
  2. # architecture-specific flags and dependencies. Remember to do have actions
  3. # for "archclean" and "archdep" for cleaning up and making dependencies for
  4. # this architecture
  5. #
  6. # This file is subject to the terms and conditions of the GNU General Public
  7. # License.  See the file "COPYING" in the main directory of this archive
  8. # for more details.
  9. #
  10. # Copyright (C) 1994 by Linus Torvalds
  11. # Changes for PPC by Gary Thomas
  12. # Rewritten by Cort Dougan and Paul Mackerras
  13. # Adjusted for PPC64 by Tom Gall
  14. #
  15. KERNELLOAD =0xc000000000000000
  16. ifeq ($(shell uname -m),ppc64)
  17. CHECKS = checks
  18. endif
  19. LINKFLAGS = -T arch/ppc64/vmlinux.lds -Bstatic 
  20. -e $(KERNELLOAD) -Ttext $(KERNELLOAD)
  21. CFLAGS := $(CFLAGS) -fsigned-char -msoft-float -pipe 
  22. -Wno-uninitialized -mminimal-toc -fno-builtin 
  23. -mtraceback=full
  24. CPP = $(CC) -E $(CFLAGS)
  25. HEAD := arch/ppc64/kernel/head.o
  26. ARCH_SUBDIRS = arch/ppc64/kernel arch/ppc64/mm arch/ppc64/lib
  27. SUBDIRS := $(SUBDIRS) $(ARCH_SUBDIRS)
  28. ARCHIVES := arch/ppc64/kernel/kernel.o arch/ppc64/mm/mm.o arch/ppc64/lib/lib.o $(ARCHIVES)
  29. CORE_FILES := arch/ppc64/kernel/kernel.o arch/ppc64/mm/mm.o arch/ppc64/lib/lib.o $(CORE_FILES)
  30. ifdef CONFIG_XMON
  31. SUBDIRS += arch/ppc64/xmon
  32. CORE_FILES += arch/ppc64/xmon/x.o
  33. endif
  34. ifdef CONFIG_KDB
  35. SUBDIRS += arch/ppc64/kdb
  36. CORE_FILES += arch/ppc64/kdb/kdba.o
  37. endif
  38. MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
  39. checks:
  40. @$(MAKE) -C arch/$(ARCH)/kernel checks
  41. ifdef CONFIG_PPC_PSERIES
  42. BOOT_TARGETS = zImage znetboot.initrd zImage.initrd
  43. endif
  44. ifdef CONFIG_PPC_ISERIES
  45. BOOT_TARGETS = vmlinux.sminitrd vmlinux.initrd vmlinux.sm
  46. endif
  47. $(BOOT_TARGETS): vmlinux
  48. @$(MAKEBOOT) $@
  49. znetboot: vmlinux
  50. ifdef CONFIG_SMP
  51. cp -f vmlinux /tftpboot/vmlinux.smp
  52. else
  53. cp -f vmlinux /tftpboot/vmlinux
  54. endif
  55. @$(MAKEBOOT) $@
  56. %_config: arch/ppc64/configs/%_defconfig
  57. rm -f .config arch/ppc64/defconfig
  58. cp -f arch/ppc64/configs/$(@:config=defconfig) arch/ppc64/defconfig
  59. archclean:
  60. rm -f arch/ppc64/kernel/{ppc_defs.h,checks,mk_defs.s,mk_defs_out.c,mk_defs_tpl}
  61. @$(MAKEBOOT) clean
  62. archmrproper:
  63. archdep:
  64. $(MAKEBOOT) fastdep