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