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