Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. # Force i386-only instructions
  2. #
  3. CFLAGS += -march=i386
  4. # Code size reduction.
  5. #
  6. CFLAGS += -fstrength-reduce -fomit-frame-pointer
  7. # Code size reduction. gcc3 needs a different syntax to gcc2 if you
  8. # want to avoid spurious warnings.
  9. #
  10. GCC_VERSION := $(subst ., ,$(shell $(CC) -dumpversion))
  11. GCC_MAJOR := $(firstword $(GCC_VERSION))
  12. ifeq ($(GCC_MAJOR),2)
  13. CFLAGS += -malign-jumps=1 -malign-loops=1 -malign-functions=1
  14. else
  15. CFLAGS += -falign-jumps=1 -falign-loops=1 -falign-functions=1
  16. endif
  17. # Code size reduction. This is almost always a win. The kernel uses it, too.
  18. #
  19. CFLAGS += -mpreferred-stack-boundary=2
  20. # Code size reduction. Use regparm for all functions - C functions
  21. # called from assembly (or vice versa) need __cdecl now
  22. #
  23. CFLAGS += -mregparm=3
  24. # Code size reduction. Use -mrtd (same __cdecl requirements as above)
  25. CFLAGS += -mrtd
  26. # Code size reduction. This is the logical complement to -mregparm=3.
  27. # It doesn't currently buy us anything, but if anything ever tries to
  28. # return small structures, let's be prepared
  29. #
  30. CFLAGS += -freg-struct-return
  31. # Force 32-bit code even on an x86-64 machine
  32. #
  33. CFLAGS += -m32
  34. ASFLAGS += --32
  35. ifeq ($(HOST_OS),FreeBSD)
  36. LDFLAGS += -m elf_i386_fbsd
  37. else
  38. LDFLAGS += -m elf_i386
  39. endif
  40. # EFI requires -fshort-wchar, and nothing else currently uses wchar_t
  41. #
  42. CFLAGS += -fshort-wchar
  43. # We need to undefine the default macro "i386" when compiling .S
  44. # files, otherwise ".arch i386" translates to ".arch 1"...
  45. #
  46. CFLAGS += -Ui386
  47. # Locations of utilities
  48. #
  49. ISOLINUX_BIN = /usr/lib/syslinux/isolinux.bin
  50. # i386-specific directories containing source files
  51. #
  52. SRCDIRS += arch/i386/core arch/i386/transitions arch/i386/prefix
  53. SRCDIRS += arch/i386/firmware/pcbios
  54. SRCDIRS += arch/i386/image
  55. SRCDIRS += arch/i386/drivers
  56. SRCDIRS += arch/i386/drivers/net
  57. SRCDIRS += arch/i386/interface/pcbios
  58. SRCDIRS += arch/i386/interface/pxe
  59. SRCDIRS += arch/i386/interface/syslinux
  60. SRCDIRS += arch/i386/interface/efi
  61. # The various xxx_loader.c files are #included into core/loader.c and
  62. # should not be compiled directly.
  63. #
  64. NON_AUTO_SRCS += arch/i386/core/aout_loader.c
  65. NON_AUTO_SRCS += arch/i386/core/freebsd_loader.c
  66. NON_AUTO_SRCS += arch/i386/core/wince_loader.c
  67. # unnrv2b.S is used to generate a 16-bit as well as a 32-bit object.
  68. #
  69. OBJS_unnrv2b = unnrv2b unnrv2b16
  70. CFLAGS_unnrv2b16 = -DCODE16
  71. # Include platform-specific Makefile
  72. #
  73. MAKEDEPS += arch/i386/Makefile.$(PLATFORM)
  74. include arch/i386/Makefile.$(PLATFORM)
  75. # Some suffixes (e.g. %.fd0) are generated directly from other
  76. # finished files (e.g. %.dsk), rather than having their own prefix.
  77. # rule to write disk images to /dev/fd0
  78. NON_AUTO_MEDIA += fd0
  79. %fd0 : %dsk
  80. $(QM)$(ECHO) " [DD] $@"
  81. $(Q)dd if=$< bs=512 conv=sync of=/dev/fd0
  82. $(Q)sync
  83. # rule to create padded disk images
  84. NON_AUTO_MEDIA += pdsk
  85. %pdsk : %dsk
  86. $(QM)$(ECHO) " [DSKPAD] $@"
  87. $(Q)cp $< $@
  88. $(Q)$(PERL) ./util/dskpad.pl $@
  89. # Add NON_AUTO_MEDIA to the media list, so that they show up in the
  90. # output of "make"
  91. #
  92. MEDIA += $(NON_AUTO_MEDIA)