You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 3.5KB

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