1SubDir HAIKU_TOP src system boot arch x86 ; 2 3local defines = $(DEFINES) ; 4 5local platform ; 6for platform in [ MultiBootSubDirSetup bios_ia32 efi pxe_ia32 ] { 7 on $(platform) { 8 DEFINES = $(defines) ; 9 DEFINES += _BOOT_MODE ; 10 11 if $(TARGET_BOOT_PLATFORM) = efi { 12 if $(TARGET_ARCH) = x86_64 { 13 DEFINES += BOOT_SUPPORT_ELF64 ; 14 } else { 15 DEFINES += BOOT_SUPPORT_ELF32 ; 16 } 17 } else { 18 DEFINES += BOOT_SUPPORT_ELF64 ; 19 DEFINES += BOOT_SUPPORT_ELF32 ; 20 } 21 22 local kernelArchSources = 23 arch_elf.cpp 24 ; 25 26 local kernelArchSpecificSources ; 27 local kernelLibArchSpecificSources ; 28 if $(TARGET_ARCH) = x86_64 && $(TARGET_BOOT_PLATFORM) = efi { 29 kernelArchSpecificSources = cpuid.cpp ; 30 kernelLibArchSpecificSources = arch_string.cpp ; 31 } else { 32 kernelArchSpecificSources = cpuid.S ; 33 kernelLibArchSpecificSources = arch_string.S ; 34 } 35 36 local librootOsArchSources = 37 byteorder.S 38 ; 39 40 BootMergeObject [ FGristFiles boot_arch_$(TARGET_KERNEL_ARCH).o ] : 41 $(kernelArchSources) 42 $(kernelArchSpecificSources) 43 $(kernelLibArchSpecificSources) 44 $(librootOsArchSources) 45 arch_cpu.cpp 46 : -std=c++11 # additional flags 47 ; 48 49 SEARCH on [ FGristFiles $(kernelArchSources) ] 50 = [ FDirName $(HAIKU_TOP) src system kernel arch x86 ] ; 51 52 if $(TARGET_ARCH) = x86_64 && $(TARGET_BOOT_PLATFORM) = efi { 53 SEARCH on [ FGristFiles $(kernelArchSpecificSources) ] 54 = [ FDirName $(HAIKU_TOP) src system kernel arch x86 64 ] ; 55 SEARCH on [ FGristFiles $(kernelLibArchSpecificSources) ] 56 = [ FDirName $(HAIKU_TOP) src system libroot posix string arch x86_64 ] ; 57 } else { 58 SEARCH on [ FGristFiles $(kernelArchSpecificSources) ] 59 = [ FDirName $(HAIKU_TOP) src system kernel arch x86 32 ] ; 60 SEARCH on [ FGristFiles $(kernelLibArchSpecificSources) ] 61 = [ FDirName $(HAIKU_TOP) src system kernel lib arch x86 ] ; 62 } 63 SEARCH on [ FGristFiles $(librootOsArchSources) ] 64 = [ FDirName $(HAIKU_TOP) src system libroot os arch x86 ] ; 65 } 66} 67