選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Makefile 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # Locations of utilities
  2. #
  3. ISOLINUX_BIN = /usr/lib/syslinux/isolinux.bin
  4. # i386-specific directories containing source files
  5. #
  6. SRCDIRS += arch/i386/core arch/i386/transitions arch/i386/prefix
  7. SRCDIRS += arch/i386/firmware/pcbios
  8. SRCDIRS += arch/i386/image
  9. SRCDIRS += arch/i386/drivers
  10. SRCDIRS += arch/i386/drivers/net
  11. SRCDIRS += arch/i386/interface/pcbios
  12. SRCDIRS += arch/i386/interface/pxe
  13. SRCDIRS += arch/i386/interface/syslinux
  14. # The various xxx_loader.c files are #included into core/loader.c and
  15. # should not be compiled directly.
  16. #
  17. NON_AUTO_SRCS += arch/i386/core/aout_loader.c
  18. NON_AUTO_SRCS += arch/i386/core/freebsd_loader.c
  19. NON_AUTO_SRCS += arch/i386/core/wince_loader.c
  20. # unnrv2b.S is used to generate a 16-bit as well as a 32-bit object.
  21. #
  22. OBJS_unnrv2b = unnrv2b unnrv2b16
  23. CFLAGS_unnrv2b16 = -DCODE16
  24. # We need to undefine the default macro "i386" when compiling .S
  25. # files, otherwise ".arch i386" translates to ".arch 1"...
  26. #
  27. CFLAGS_S += -Ui386
  28. # The i386 linker script
  29. #
  30. LDSCRIPT = arch/i386/scripts/i386.lds
  31. # Media types.
  32. #
  33. MEDIA += rom
  34. MEDIA += pxe
  35. MEDIA += kpxe
  36. MEDIA += elf
  37. MEDIA += elfd
  38. MEDIA += lmelf
  39. MEDIA += lmelfd
  40. MEDIA += lkrn
  41. MEDIA += bImage
  42. MEDIA += dsk
  43. MEDIA += nbi
  44. MEDIA += hd
  45. MEDIA += raw
  46. MEDIA += com
  47. MEDIA += exe
  48. # Special target for building Master Boot Record binary
  49. $(BIN)/mbr.bin : $(BIN)/mbr.o
  50. $(OBJCOPY) -O binary $< $@
  51. # Some suffixes (e.g. %.fd0) are generated directly from other
  52. # finished files (e.g. %.dsk), rather than having their own prefix.
  53. # rule to write disk images to /dev/fd0
  54. NON_AUTO_MEDIA += fd0
  55. %fd0 : %dsk
  56. dd if=$< bs=512 conv=sync of=/dev/fd0
  57. sync
  58. # rule to create padded disk images
  59. NON_AUTO_MEDIA += pdsk
  60. %pdsk : %dsk
  61. cp $< $@
  62. $(PERL) ./util/dskpad.pl $@
  63. # rule to make a non-emulation ISO boot image
  64. NON_AUTO_MEDIA += iso
  65. %iso: %lkrn util/geniso
  66. ISOLINUX_BIN=$(ISOLINUX_BIN) bash util/geniso $@ $<
  67. # rule to make a floppy emulation ISO boot image
  68. NON_AUTO_MEDIA += liso
  69. %liso: %lkrn util/genliso
  70. bash util/genliso $@ $<
  71. # rule to make a USB disk image
  72. $(BIN)/usbdisk.bin : $(BIN)/usbdisk.o
  73. $(OBJCOPY) -O binary $< $@
  74. NON_AUTO_MEDIA += usb
  75. %usb: $(BIN)/usbdisk.bin %hd
  76. cat $^ > $@
  77. # Add NON_AUTO_MEDIA to the media list, so that they show up in the
  78. # output of "make"
  79. #
  80. MEDIA += $(NON_AUTO_MEDIA)
  81. # Shortcut to allow typing just
  82. # make bin-kir/%
  83. # rather than
  84. # make -f arch/i386/kir-Makefile bin-kir/%
  85. # for building a KEEP_IT_REAL flavour.
  86. #
  87. $(BIN)-kir/% : kir-target
  88. $(MAKE) -f arch/i386/kir-Makefile $(MAKECMDGOALS)
  89. .PHONY : kir-target