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

Linux/Unix编程

开发平台:

Unix_Linux

  1. # BK Id: SCCS/s.Makefile 1.30 01/26/02 12:27:41 trini
  2. #
  3. # arch/ppc/boot/Makefile
  4. #
  5. # This file is subject to the terms and conditions of the GNU General Public
  6. # License.  See the file "COPYING" in the main directory of this archive
  7. # for more details.
  8. #
  9. # Tom Rini January 2001
  10. #
  11. # Originally:
  12. # arch/ppc/boot/Makefile
  13. # Copyright (C) 1994 by Linus Torvalds
  14. # Adapted for PowerPC by Gary Thomas
  15. # modified by Cort (cort@cs.nmt.edu)
  16. #
  17. USE_STANDARD_AS_RULE := true
  18. TFTPIMAGE = /tftpboot/zImage.prep
  19. ifeq ($(CONFIG_SMP),y)
  20. TFTPIMAGE = $(TFTPBOOT).smp
  21. endif
  22. LD_ARGS = -T ../ld.script -Ttext 0x00800000 -Bstatic
  23. obj-y := head.o ../simple/legacy.o misc.o of1275.o 
  24. ../common/util.o ../common/string.o 
  25. ../common/misc-common.o
  26. OBJCOPY_ARGS = -O elf32-powerpc
  27. LIBS  = ../lib/zlib.a
  28. obj-$(CONFIG_SERIAL_CONSOLE) += ../common/ns16550.o
  29. obj-$(CONFIG_VGA_CONSOLE) += vreset.o kbd.o
  30. # Tools
  31. MKPREP := ../utils/mkprep
  32. SIZE := ../utils/size
  33. OFFSET := ../utils/offset
  34. # Extra include search dirs
  35. CFLAGS_kbd.o += -I$(TOPDIR)/drivers/char
  36. AFLAGS_head.o += -I$(TOPDIR)/arch/$(ARCH)/kernel
  37. AFLAGS_../common/util.o += -I$(TOPDIR)/arch/$(ARCH)/kernel
  38. AFLAGS_../common/relocate.o += -I$(TOPDIR)/arch/$(ARCH)/kernel
  39. AFLAGS_../simple/legacy.o += -I$(TOPDIR)/arch/$(ARCH)/kernel
  40. all: zImage
  41. zImage: $(obj-y) $(LIBS) ../ld.script ../images/vmlinux.gz ../common/dummy.o 
  42. $(MKPREP)
  43. $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment 
  44. --add-section=.image=../images/vmlinux.gz 
  45. --set-section-flags=.image=contents,alloc,load,readonly,data 
  46. ../common/dummy.o image.o
  47. $(LD) $(LD_ARGS) -o $@ $(obj-y) image.o $(LIBS)
  48. $(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R .comment -R .stab -R .stabstr
  49. $(MKPREP) -pbp $@ ../images/$@.prep
  50. rm -f $@
  51. zImage.initrd: $(obj-y) $(LIBS) ../ld.script ../images/vmlinux.gz $(MKPREP) 
  52. ../common/dummy.o
  53. $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment 
  54. --add-section=.ramdisk=../images/ramdisk.image.gz 
  55. --set-section-flags=.ramdisk=contents,alloc,load,readonly,data 
  56. --add-section=.image=../images/vmlinux.gz 
  57. --set-section-flags=.image=contents,alloc,load,readonly,data 
  58. ../common/dummy.o image.o
  59. $(LD) $(LD_ARGS) -o $@ $(obj-y) image.o $(LIBS)
  60. $(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R .comment -R .stab -R .stabstr
  61. $(MKPREP) -pbp $@ ../images/$@.prep
  62. rm -f $@
  63. floppy: zImage
  64. dd if=../images/zImage.prep of=/dev/fd0H1440 bs=64b
  65. znetboot : zImage
  66. cp ../images/zImage.prep $(TFTPIMAGE)
  67. znetboot.initrd : zImage.initrd
  68. cp ../images/zImage.initrd.prep $(TFTPIMAGE)
  69. include $(TOPDIR)/Rules.make