xref: /haiku/src/system/boot/arch/riscv64/Jamfile (revision a5c0d1a80e18f50987966fda2005210092d7671b)
1SubDir HAIKU_TOP src system boot arch riscv64 ;
2
3{
4	local defines = _BOOT_MODE ;
5
6	defines = [ FDefines $(defines) ] ;
7	SubDirCcFlags $(defines) ;
8	SubDirC++Flags $(defines) -fno-rtti ;
9}
10
11# Optimizations create infinite recursion otherwise.
12SubDirCcFlags -fno-builtin ;
13
14local librootArchSources =
15        byteorder.S
16;
17
18local librootGenericSources =
19	memcpy.c
20	memset.c
21;
22
23local kernelArchDriverSources =
24	arch_elf.cpp
25	arch_uart_sifive.cpp
26	sbi_syscalls.S
27;
28
29local kernelGenericDriverSources =
30	debug_uart.cpp
31	debug_uart_8250.cpp
32;
33
34local platform ;
35for platform in [ MultiBootSubDirSetup u-boot efi riscv ] {
36	on $(platform) {
37		DEFINES += _BOOT_MODE ;
38		BootMergeObject [ FGristFiles boot_arch_$(TARGET_KERNEL_ARCH).o ] :
39			$(kernelArchDriverSources)
40			$(kernelGenericDriverSources)
41
42			$(librootArchSources)
43			$(librootGenericSources)
44
45			arch_cpu.cpp
46			: # additional flags
47			:
48			$(kernelArchObjects)
49		;
50
51		SEARCH on [ FGristFiles $(librootArchSources) ]
52			= [ FDirName $(HAIKU_TOP) src system libroot os arch riscv64 ] ;
53		SEARCH on [ FGristFiles $(librootGenericSources) ]
54			= [ FDirName $(HAIKU_TOP) src system libroot posix string arch generic ] ;
55
56		SEARCH on [ FGristFiles $(kernelArchDriverSources) ]
57			= [ FDirName $(HAIKU_TOP) src system kernel arch $(TARGET_KERNEL_ARCH_DIR) ] ;
58		SEARCH on [ FGristFiles $(kernelGenericDriverSources) ]
59			= [ FDirName $(HAIKU_TOP) src system kernel arch generic ] ;
60		SEARCH on [ FGristFiles $(kernelDebugSources) ]
61			= [ FDirName $(HAIKU_TOP) src system kernel debug ] ;
62	}
63}
64