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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. # hooks.c is used to generate hooks.o and hooks_rm.o
  22. #
  23. OBJS_hooks = hooks hooks_rm
  24. CFLAGS_hooks_rm = -DREALMODE
  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 += raw
  71. OBJS_rawprefix = rawprefix zrawprefix
  72. CFLAGS_zrawprefix = $(CFLAGS_ZPREFIX)
  73. # These media cannot handle compressed payloads
  74. MEDIA += com
  75. MEDIA += exe
  76. # Some suffixes (e.g. %.zfd0) are generated directly from other
  77. # finished files (e.g. %.zdsk), rather than having their own prefix.
  78. # rule to write disk images to /dev/fd0
  79. NON_AUTO_MEDIA += fd0
  80. %fd0 : %dsk
  81. dd if=$< bs=512 conv=sync of=/dev/fd0
  82. sync
  83. # rule to make a non-emulation ISO boot image
  84. NON_AUTO_MEDIA += iso
  85. %iso: %lilo util/geniso
  86. ISOLINUX_BIN=$(ISOLINUX_BIN) bash util/geniso $@ $<
  87. # rule to make a floppy emulation ISO boot image
  88. NON_AUTO_MEDIA += liso
  89. %liso: %lilo util/genliso
  90. bash util/genliso $@ $<
  91. # Add NON_AUTO_MEDIA to the media list, so that they show up in the
  92. # output of "make"
  93. #
  94. MEDIA += $(NON_AUTO_MEDIA)
  95. # Shortcut to allow typing just
  96. # make bin-kir/%
  97. # rather than
  98. # make -f arch/i386/kir-Makefile bin-kir/%
  99. # for building a KEEP_IT_REAL flavour.
  100. #
  101. $(BIN)-kir/% : kir-target
  102. $(MAKE) -f arch/i386/kir-Makefile $(MAKECMDGOALS)
  103. .PHONY : kir-target