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

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