SubDir HAIKU_TOP src system boot arch x86 ; local defines = $(DEFINES) ; local platform ; for platform in [ MultiBootSubDirSetup bios_ia32 efi pxe_ia32 ] { on $(platform) { SubDirHdrs $(HAIKU_TOP) src system boot platform $(TARGET_BOOT_PLATFORM) ; DEFINES = $(defines) ; DEFINES += _BOOT_MODE ; if $(TARGET_BOOT_PLATFORM) = efi { if $(TARGET_ARCH) = x86_64 { DEFINES += BOOT_SUPPORT_ELF64 ; } else { DEFINES += BOOT_SUPPORT_ELF32 ; } } else { DEFINES += BOOT_SUPPORT_ELF64 ; DEFINES += BOOT_SUPPORT_ELF32 ; } local kernelArchSources = arch_elf.cpp ; local kernelArchSpecificSources ; local kernelLibArchSpecificSources ; if $(TARGET_ARCH) = x86_64 && $(TARGET_BOOT_PLATFORM) = efi { kernelArchSpecificSources = cpuid.cpp ; kernelLibArchSpecificSources = arch_string.cpp ; } else { kernelArchSpecificSources = cpuid.S ; kernelLibArchSpecificSources = arch_string.S ; } local librootOsArchSources = byteorder.S ; BootMergeObject [ FGristFiles boot_arch_$(TARGET_KERNEL_ARCH).o ] : $(kernelArchSources) $(kernelArchSpecificSources) $(kernelLibArchSpecificSources) $(librootOsArchSources) arch_cpu.cpp arch_hpet.cpp : -std=c++11 # additional flags ; SEARCH on [ FGristFiles $(kernelArchSources) ] = [ FDirName $(HAIKU_TOP) src system kernel arch x86 ] ; if $(TARGET_ARCH) = x86_64 && $(TARGET_BOOT_PLATFORM) = efi { SEARCH on [ FGristFiles $(kernelArchSpecificSources) ] = [ FDirName $(HAIKU_TOP) src system kernel arch x86 64 ] ; SEARCH on [ FGristFiles $(kernelLibArchSpecificSources) ] = [ FDirName $(HAIKU_TOP) src system libroot posix string arch x86_64 ] ; } else { SEARCH on [ FGristFiles $(kernelArchSpecificSources) ] = [ FDirName $(HAIKU_TOP) src system kernel arch x86 32 ] ; SEARCH on [ FGristFiles $(kernelLibArchSpecificSources) ] = [ FDirName $(HAIKU_TOP) src system kernel lib arch x86 ] ; } SEARCH on [ FGristFiles $(librootOsArchSources) ] = [ FDirName $(HAIKU_TOP) src system libroot os arch x86 ] ; } }