xref: /haiku/src/system/boot/loader/Jamfile (revision 35fad4a46728adcf9408442db53bc71c870236c8)
1338b8dc3SIngo WeinholdSubDir HAIKU_TOP src system boot loader ;
25af32e75SAxel Dörfler
3338b8dc3SIngo WeinholdSubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ;
4338b8dc3SIngo WeinholdSubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ;
561ba1259SAxel DörflerSubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ;
6338b8dc3SIngo WeinholdSubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ;
76b202f4eSIngo WeinholdUsePrivateKernelHeaders ;
85af32e75SAxel DörflerUsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
96b202f4eSIngo WeinholdUsePrivateHeaders [ FDirName kernel util ] ;
106b202f4eSIngo WeinholdUsePrivateHeaders shared storage ;
115af32e75SAxel Dörfler
121f96a3cbSJessica Hamiltonlocal defines = $(DEFINES) ;
131f96a3cbSJessica Hamilton
141f96a3cbSJessica Hamiltonlocal platform ;
151f96a3cbSJessica Hamiltonfor platform in [ MultiBootSubDirSetup ] {
161f96a3cbSJessica Hamilton	on $(platform) {
175af32e75SAxel Dörfler		{
181f96a3cbSJessica Hamilton			DEFINES = $(defines) ;
191f96a3cbSJessica Hamilton
2030572237SIngo Weinhold			DEFINES +=
215af32e75SAxel Dörfler				_BOOT_MODE
22da80a050SAlex Smith				BOOT_ARCH=\\\"$(TARGET_KERNEL_ARCH)\\\"
23c06e68d0SAxel Dörfler				KMESSAGE_CONTAINER_ONLY
245af32e75SAxel Dörfler
255af32e75SAxel Dörfler				BOOT_SUPPORT_PARTITION_INTEL
265af32e75SAxel Dörfler
275af32e75SAxel Dörfler				BOOT_SUPPORT_FILE_SYSTEM_BFS
2885a53ea2SAxel Dörfler				BOOT_SUPPORT_FILE_SYSTEM_TARFS
29f335531bSFrançois Revol				#BOOT_SUPPORT_FILE_MAP_DISK
30085cf27bSIngo Weinhold				BOOT_SUPPORT_FILE_SYSTEM_FAT
315af32e75SAxel Dörfler			;
325af32e75SAxel Dörfler
33*35fad4a4SAlexander von Gluck IV			if $(TARGET_BOOT_PLATFORM) = efi {
34*35fad4a4SAlexander von Gluck IV				DEFINES +=
35*35fad4a4SAlexander von Gluck IV					_BOOT_PLATFORM_EFI
36*35fad4a4SAlexander von Gluck IV					BOOT_SUPPORT_PARTITION_EFI
37*35fad4a4SAlexander von Gluck IV				;
38*35fad4a4SAlexander von Gluck IV			}
39*35fad4a4SAlexander von Gluck IV
40c06e68d0SAxel Dörfler			# Add architecture specific partition/file system modules
41c06e68d0SAxel Dörfler
42da80a050SAlex Smith			switch $(TARGET_KERNEL_ARCH) {
43c06e68d0SAxel Dörfler				case "ppc" :
44c06e68d0SAxel Dörfler				{
4530572237SIngo Weinhold					DEFINES +=
4609b40d16SYnoga						BOOT_SUPPORT_ELF32 #How to deal with PPC970 ?
47c06e68d0SAxel Dörfler						BOOT_SUPPORT_PARTITION_AMIGA
48c06e68d0SAxel Dörfler						BOOT_SUPPORT_PARTITION_APPLE
49c06e68d0SAxel Dörfler
50c06e68d0SAxel Dörfler						BOOT_SUPPORT_FILE_SYSTEM_AMIGA_FFS
51c06e68d0SAxel Dörfler					;
52c06e68d0SAxel Dörfler				}
53c06e68d0SAxel Dörfler				case "x86" :
54c06e68d0SAxel Dörfler				{
5530572237SIngo Weinhold					DEFINES +=
567417d5edSAlex Smith						ALTERNATE_BOOT_ARCH=\\\"x86_64\\\"
57f6a34444SAlex Smith						BOOT_SUPPORT_ELF64
587417d5edSAlex Smith
59c06e68d0SAxel Dörfler						BOOT_SUPPORT_PARTITION_EFI
60c06e68d0SAxel Dörfler
619e90c30eSAxel Dörfler						#BOOT_SUPPORT_FILE_SYSTEM_FAT
62c06e68d0SAxel Dörfler					;
63*35fad4a4SAlexander von Gluck IV					if $(TARGET_BOOT_PLATFORM) != efi {
6403c037b9SJérôme Duval						DEFINES +=
6503c037b9SJérôme Duval							_BOOT_PLATFORM_BIOS
6603c037b9SJérôme Duval							BOOT_SUPPORT_ELF32
6703c037b9SJérôme Duval						;
6825fa3b1bSJessica Hamilton					}
69ddf7e72fSPulkoMandy				}
70ddf7e72fSPulkoMandy				case "sparc" :
71ddf7e72fSPulkoMandy				{
72*35fad4a4SAlexander von Gluck IV					DEFINES += BOOT_SUPPORT_ELF64 ;
73ddf7e72fSPulkoMandy				}
74170aff0aSAlexander von Gluck IV				case "riscv64" :
75ddf7e72fSPulkoMandy				{
76*35fad4a4SAlexander von Gluck IV					DEFINES += BOOT_SUPPORT_ELF64 ;
77ddf7e72fSPulkoMandy				}
78ddf7e72fSPulkoMandy				case "m68k" :
79ddf7e72fSPulkoMandy				{
80ddf7e72fSPulkoMandy					DEFINES += BOOT_SUPPORT_ELF32 ;
81ddf7e72fSPulkoMandy				}
82ddf7e72fSPulkoMandy				case "arm" :
83ddf7e72fSPulkoMandy				{
84ddf7e72fSPulkoMandy					DEFINES += BOOT_SUPPORT_ELF32 ;
85ddf7e72fSPulkoMandy				}
86ddf7e72fSPulkoMandy			}
8725fa3b1bSJessica Hamilton
8830572237SIngo Weinhold			local kernelC++Header = [ FDirName $(HAIKU_TOP) headers private kernel util
8930572237SIngo Weinhold				kernel_cpp.h ] ;
9030572237SIngo Weinhold
9130572237SIngo Weinhold			SubDirC++Flags -fno-rtti -include $(kernelC++Header) ;
925af32e75SAxel Dörfler		}
935af32e75SAxel Dörfler
9430572237SIngo Weinhold
951f96a3cbSJessica Hamilton		BootStaticLibrary [ MultiBootGristFiles boot_loader ] :
96560961eeSMurai Takashi			PathBlocklist.cpp
975af32e75SAxel Dörfler			elf.cpp
9828a2172cSIngo Weinhold			heap.cpp
995af32e75SAxel Dörfler			kernel_args.cpp
1005af32e75SAxel Dörfler			load_driver_settings.cpp
10128a2172cSIngo Weinhold			loader.cpp
10228a2172cSIngo Weinhold			main.cpp
10328a2172cSIngo Weinhold			menu.cpp
1045c0f8450SIngo Weinhold			package_support.cpp
10528a2172cSIngo Weinhold			pager.cpp
10628a2172cSIngo Weinhold			partitions.cpp
10728a2172cSIngo Weinhold			RootFileSystem.cpp
10828a2172cSIngo Weinhold			stdio.cpp
10928a2172cSIngo Weinhold			vfs.cpp
11028a2172cSIngo Weinhold			vm.cpp
1115af32e75SAxel Dörfler
1125af32e75SAxel Dörfler			# libroot
11385db3873SIngo Weinhold			driver_settings.cpp
1145af32e75SAxel Dörfler
1155af32e75SAxel Dörfler			# utils
1165af32e75SAxel Dörfler			kernel_cpp.cpp
1179e8dc2a9SIngo Weinhold			KMessage.cpp
118bd185b41SIngo Weinhold			list.cpp
11928a2172cSIngo Weinhold			ring_buffer.cpp
12089294b50SAxel Dörfler			safemode_settings.cpp
1213a7e0b00SIngo Weinhold			StringHash.cpp
1225af32e75SAxel Dörfler
12332832cbeSIngo Weinhold			DataIO.cpp
12430572237SIngo Weinhold			Referenceable.cpp
1255af32e75SAxel Dörfler			;
1265af32e75SAxel Dörfler
1275af32e75SAxel Dörfler		# The partition support is built in an extra static library
1285af32e75SAxel Dörfler		# so that only the ones that are used will be included.
1295af32e75SAxel Dörfler
1301f96a3cbSJessica Hamilton		BootStaticLibrary [ MultiBootGristFiles boot_partitions ] :
131f335531bSFrançois Revol			FileMapDisk.cpp
1325af32e75SAxel Dörfler			amiga_rdb.cpp
1335af32e75SAxel Dörfler			apple.cpp
134ab313893SAxel Dörfler
135ed7204faSAlexander von Gluck IV			gpt.cpp
136ab313893SAxel Dörfler			Header.cpp
137ab313893SAxel Dörfler			crc32.cpp
138ab313893SAxel Dörfler			utility.cpp
139ab313893SAxel Dörfler
1405af32e75SAxel Dörfler			intel.cpp
1415af32e75SAxel Dörfler			PartitionMap.cpp
1425af32e75SAxel Dörfler			PartitionMapParser.cpp
1435af32e75SAxel Dörfler			;
1445af32e75SAxel Dörfler
1455af32e75SAxel Dörfler		# Tell Jam where to find the utility sources
1463a7e0b00SIngo Weinhold		SEARCH on [ FGristFiles kernel_cpp.cpp list.cpp ring_buffer.cpp StringHash.cpp ]
147338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
1485af32e75SAxel Dörfler
1499e8dc2a9SIngo Weinhold		SEARCH on [ FGristFiles KMessage.cpp ]
1509e8dc2a9SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
1519e8dc2a9SIngo Weinhold
15289294b50SAxel Dörfler		SEARCH on [ FGristFiles safemode_settings.cpp ]
15389294b50SAxel Dörfler			= [ FDirName $(HAIKU_TOP) src system kernel debug ] ;
15489294b50SAxel Dörfler
15585db3873SIngo Weinhold		SEARCH on [ FGristFiles driver_settings.cpp ]
156338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src system libroot os ] ;
1575af32e75SAxel Dörfler
1585af32e75SAxel Dörfler		SEARCH on [ FGristFiles amiga_rdb.cpp ]
159338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ;
1605af32e75SAxel Dörfler
1615af32e75SAxel Dörfler		SEARCH on [ FGristFiles apple.cpp ]
162338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ;
1635af32e75SAxel Dörfler
164ed7204faSAlexander von Gluck IV		SEARCH on [ FGristFiles gpt.cpp Header.cpp crc32.cpp utility.cpp ]
16561ba1259SAxel Dörfler			= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ] ;
166eef8417eSAxel Dörfler
1675af32e75SAxel Dörfler		SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ]
168338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ;
1695af32e75SAxel Dörfler
1705af32e75SAxel Dörfler		SEARCH on [ FGristFiles stage2_crt0.S ]
171da80a050SAlex Smith			= [ FDirName $(HAIKU_TOP) src system boot arch $(TARGET_KERNEL_ARCH) ] ;
1725af32e75SAxel Dörfler
17332832cbeSIngo Weinhold		SEARCH on [ FGristFiles DataIO.cpp Referenceable.cpp ]
17430572237SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src kits support ] ;
1751f96a3cbSJessica Hamilton	}
1761f96a3cbSJessica Hamilton}
1775af32e75SAxel Dörfler
178338b8dc3SIngo WeinholdSubInclude HAIKU_TOP src system boot loader file_systems ;
179d561d0adSIngo WeinholdSubInclude HAIKU_TOP src system boot loader net ;
180