Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

Makefile 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. # i386-specific directories containing source files
  2. #
  3. SRCDIRS += arch/i386/core arch/i386/transitions arch/i386/prefix
  4. SRCDIRS += arch/i386/firmware/pcbios arch/i386/firmware/linuxbios
  5. SRCDIRS += arch/i386/drivers/net
  6. # The various xxx_loader.c files are #included into core/loader.c and
  7. # should not be compiled directly.
  8. #
  9. NON_AUTO_SRCS += arch/i386/core/aout_loader.c
  10. NON_AUTO_SRCS += arch/i386/core/freebsd_loader.c
  11. NON_AUTO_SRCS += arch/i386/core/multiboot_loader.c
  12. NON_AUTO_SRCS += arch/i386/core/tagged_loader.c
  13. NON_AUTO_SRCS += arch/i386/core/wince_loader.c
  14. # setup.S and unnrv2b.S are both used to generate 16-bit as well as
  15. # 32-bit objects.
  16. #
  17. OBJS_setup = setup setup16
  18. CFLAGS_setup16 = -DCODE16
  19. OBJS_unnrv2b = unnrv2b unnrv2b16
  20. CFLAGS_unnrv2b16 = -DCODE16
  21. # We need to undefine the default macro "i386" when compiling .S
  22. # files, otherwise ".arch i386" translates to ".arch 1"...
  23. #
  24. CFLAGS_S += -Ui386
  25. # The i386 linker script
  26. #
  27. LDSCRIPT = arch/i386/scripts/i386.lds
  28. # Media types.
  29. #
  30. # It's ugly that we have to define these repetitive combinations by
  31. # hand. Unforunately, $(eval ...) is available only in make >= 3.80,
  32. # and using an external Makefile fragment doesn't work because
  33. # OBJS_xxx need to be defined *before* the external Makefile fragments
  34. # for the source files are generated...
  35. CFLAGS_ZPREFIX = -DCOMPRESS
  36. MEDIA += rom
  37. OBJS_romprefix = isaprefix zisaprefix pciprefix zpciprefix
  38. CFLAGS_isaprefix =
  39. CFLAGS_zisaprefix = $(CFLAGS_ZPREFIX)
  40. CFLAGS_pciprefix = -DPCI_PNP_HEADER
  41. CFLAGS_zpciprefix = $(CFLAGS_pciprefix) $(CFLAGS_ZPREFIX)
  42. MEDIA += pxe
  43. OBJS_pxeprefix = pxeprefix zpxeprefix
  44. CFLAGS_zpxeprefix = $(CFLAGS_ZPREFIX)
  45. MEDIA += elf
  46. OBJS_elfprefix = elfprefix zelfprefix
  47. CFLAGS_zelfprefix = $(CFLAGS_ZPREFIX)
  48. MEDIA += elfd
  49. OBJS_elfdprefix = elfdprefix zelfdprefix
  50. CFLAGS_zelfdprefix = $(CFLAGS_ZPREFIX)
  51. MEDIA += lmelf
  52. OBJS_lmelfprefix = lmelfprefix zlmelfprefix
  53. CFLAGS_zlmelfprefix = $(CFLAGS_ZPREFIX)
  54. MEDIA += lmelfd
  55. OBJS_lmelfdprefix = lmelfdprefix zlmelfdprefix
  56. CFLAGS_zlmelfdprefix = $(CFLAGS_ZPREFIX)
  57. MEDIA += lilo
  58. OBJS_liloprefix = liloprefix zliloprefix
  59. CFLAGS_zliloprefix = $(CFLAGS_ZPREFIX)
  60. MEDIA += bImage
  61. OBJS_bImageprefix = bImageprefix zbImageprefix
  62. CFLAGS_zbImageprefix = $(CFLAGS_ZPREFIX)
  63. MEDIA += dsk
  64. OBJS_dskprefix = dskprefix zdskprefix
  65. CFLAGS_zdskprefix = $(CFLAGS_ZPREFIX)
  66. MEDIA += raw
  67. OBJS_rawprefix = rawprefix zrawprefix
  68. CFLAGS_zrawprefix = $(CFLAGS_ZPREFIX)
  69. # These media cannot handle compressed payloads
  70. MEDIA += com
  71. MEDIA += exe
  72. # Some suffixes (e.g. %.zfd0) are generated directly from other
  73. # finished files (e.g. %.zdsk), rather than having their own prefix.
  74. # rule to write disk images to /dev/fd0
  75. NON_AUTO_MEDIA += fd0
  76. %fd0 : %dsk
  77. dd if=$< bs=512 conv=sync of=/dev/fd0
  78. sync
  79. # rule to make a non-emulation ISO boot image
  80. NON_AUTO_MEDIA += iso
  81. %iso: %lilo util/geniso
  82. ISOLINUX_BIN=$(ISOLINUX_BIN) bash util/geniso $@ $<
  83. # rule to make a floppy emulation ISO boot image
  84. NON_AUTO_MEDIA += liso
  85. %liso: %lilo util/genliso
  86. bash util/genliso $@ $<
  87. # Add NON_AUTO_MEDIA to the media list, so that they show up in the
  88. # output of "make"
  89. #
  90. MEDIA += $(NON_AUTO_MEDIA)
  91. # Shortcut to allow typing just
  92. # make bin-kir/%
  93. # rather than
  94. # make -f arch/i386/kir-Makefile bin-kir/%
  95. # for building a KEEP_IT_REAL flavour.
  96. #
  97. $(BIN)-kir/% : kir-target
  98. $(MAKE) -f arch/i386/kir-Makefile $(MAKECMDGOALS)
  99. .PHONY : kir-target