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.4KB

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