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