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