xref: /haiku/src/system/boot/platform/efi/Jamfile (revision 9d010ea47db677131e385b5e7855d38fd0c8103f)
1SubDir HAIKU_TOP src system boot platform efi ;
2
3UsePrivateHeaders [ FDirName kernel boot ] ;
4UsePrivateHeaders [ FDirName kernel boot platform efi ] ;
5UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) ] ;
6UseBuildFeatureHeaders gnuefi ;
7UseBuildFeatureHeaders gnuefi : headersProtocol ;
8UseBuildFeatureHeaders gnuefi : headersArch ;
9SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ;
10
11{
12	local defines = _BOOT_MODE GNU_EFI_USE_MS_ABI _BOOT_PLATFORM_EFI ;
13	defines = [ FDefines $(defines) ] ;
14	SubDirCcFlags $(defines) ;
15	SubDirC++Flags $(defines) -fno-rtti ;
16}
17
18local efi_glue_src =
19	crt0-efi-$(TARGET_ARCH).S
20	;
21
22local platform_src =
23	start.cpp
24	console.cpp
25	video.cpp
26	debug.cpp
27	mmu.cpp
28	heap.cpp
29	acpi.cpp
30	menu.cpp
31	devices.cpp
32	hpet.cpp
33	cpu.cpp
34	smp.cpp
35	serial.cpp
36	smp_trampoline.S
37	support.S
38	;
39
40Includes [ FGristFiles $(efi_glue_src) $(platform_src) ]
41	:
42	[ BuildFeatureAttribute gnuefi : headers ]
43	[ BuildFeatureAttribute gnuefi : headersProtocol ]
44	[ BuildFeatureAttribute gnuefi : headersArch ]
45	;
46
47local platform ;
48for platform in [ MultiBootSubDirSetup efi ] {
49	on $(platform) {
50
51		BootMergeObject boot_platform_efi_common.o :
52			$(efi_glue_src)
53			$(platform_src)
54			:
55			: boot_platform_generic_efi.a
56		;
57
58		BootMergeObject boot_platform_efi.o :
59			: :
60			boot_platform_efi_$(TARGET_ARCH).o
61			boot_platform_efi_common.o
62		;
63
64		LOCATE on [ FGristFiles $(efi_glue_src) ]
65			= [ BuildFeatureAttribute gnuefi : libdir : path ] ;
66		Depends [ FGristFiles $(efi_glue_src) ]
67			: [ BuildFeatureAttribute gnuefi : libdir ] ;
68		Depends [ FGristFiles $(platform_src) ]
69			: [ BuildFeatureAttribute gnuefi : headers ] ;
70	}
71}
72
73SubInclude HAIKU_TOP src system boot platform efi arch $(TARGET_ARCH) ;
74