xref: /haiku/src/system/boot/loader/Jamfile (revision c4eec9f1e83039370316bce40ff4e0ce37e135c3)
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
22*c4eec9f1SAugustin Cavalier				BOOT_ARCH=\\\"$(TARGET_KERNEL_ARCH_DIR)\\\"
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
3335fad4a4SAlexander von Gluck IV			if $(TARGET_BOOT_PLATFORM) = efi {
3435fad4a4SAlexander von Gluck IV				DEFINES +=
3535fad4a4SAlexander von Gluck IV					_BOOT_PLATFORM_EFI
3635fad4a4SAlexander von Gluck IV					BOOT_SUPPORT_PARTITION_EFI
3735fad4a4SAlexander von Gluck IV				;
3835fad4a4SAlexander von Gluck IV			}
3935fad4a4SAlexander von Gluck IV
40c06e68d0SAxel Dörfler			# Add architecture specific partition/file system modules
41c06e68d0SAxel Dörfler
42*c4eec9f1SAugustin Cavalier			switch $(TARGET_KERNEL_ARCH_DIR) {
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					;
6335fad4a4SAlexander 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				{
7235fad4a4SAlexander von Gluck IV					DEFINES += BOOT_SUPPORT_ELF64 ;
73ddf7e72fSPulkoMandy				}
74170aff0aSAlexander von Gluck IV				case "riscv64" :
75ddf7e72fSPulkoMandy				{
7635fad4a4SAlexander 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				}
865e567c10SFredrik Holmqvist				case "arm64" :
875e567c10SFredrik Holmqvist				{
885e567c10SFredrik Holmqvist					DEFINES += BOOT_SUPPORT_ELF64 ;
895e567c10SFredrik Holmqvist				}
90ddf7e72fSPulkoMandy			}
9125fa3b1bSJessica Hamilton
9230572237SIngo Weinhold			local kernelC++Header = [ FDirName $(HAIKU_TOP) headers private kernel util
9330572237SIngo Weinhold				kernel_cpp.h ] ;
9430572237SIngo Weinhold
9530572237SIngo Weinhold			SubDirC++Flags -fno-rtti -include $(kernelC++Header) ;
965af32e75SAxel Dörfler		}
975af32e75SAxel Dörfler
9830572237SIngo Weinhold
991f96a3cbSJessica Hamilton		BootStaticLibrary [ MultiBootGristFiles boot_loader ] :
100560961eeSMurai Takashi			PathBlocklist.cpp
1015af32e75SAxel Dörfler			elf.cpp
10228a2172cSIngo Weinhold			heap.cpp
1035af32e75SAxel Dörfler			kernel_args.cpp
1045af32e75SAxel Dörfler			load_driver_settings.cpp
10528a2172cSIngo Weinhold			loader.cpp
10628a2172cSIngo Weinhold			main.cpp
10728a2172cSIngo Weinhold			menu.cpp
1085c0f8450SIngo Weinhold			package_support.cpp
10928a2172cSIngo Weinhold			pager.cpp
11028a2172cSIngo Weinhold			partitions.cpp
11128a2172cSIngo Weinhold			RootFileSystem.cpp
11228a2172cSIngo Weinhold			stdio.cpp
11328a2172cSIngo Weinhold			vfs.cpp
11428a2172cSIngo Weinhold			vm.cpp
1155af32e75SAxel Dörfler
1165af32e75SAxel Dörfler			# libroot
11785db3873SIngo Weinhold			driver_settings.cpp
1185af32e75SAxel Dörfler
1195af32e75SAxel Dörfler			# utils
1205af32e75SAxel Dörfler			kernel_cpp.cpp
1219e8dc2a9SIngo Weinhold			KMessage.cpp
122bd185b41SIngo Weinhold			list.cpp
12328a2172cSIngo Weinhold			ring_buffer.cpp
12489294b50SAxel Dörfler			safemode_settings.cpp
1253a7e0b00SIngo Weinhold			StringHash.cpp
1265af32e75SAxel Dörfler
12732832cbeSIngo Weinhold			DataIO.cpp
12830572237SIngo Weinhold			Referenceable.cpp
1295af32e75SAxel Dörfler			;
1305af32e75SAxel Dörfler
1315af32e75SAxel Dörfler		# The partition support is built in an extra static library
1325af32e75SAxel Dörfler		# so that only the ones that are used will be included.
1335af32e75SAxel Dörfler
1341f96a3cbSJessica Hamilton		BootStaticLibrary [ MultiBootGristFiles boot_partitions ] :
135f335531bSFrançois Revol			FileMapDisk.cpp
1365af32e75SAxel Dörfler			amiga_rdb.cpp
1375af32e75SAxel Dörfler			apple.cpp
138ab313893SAxel Dörfler
139ed7204faSAlexander von Gluck IV			gpt.cpp
140ab313893SAxel Dörfler			Header.cpp
141ab313893SAxel Dörfler			crc32.cpp
142ab313893SAxel Dörfler			utility.cpp
143ab313893SAxel Dörfler
1445af32e75SAxel Dörfler			intel.cpp
1455af32e75SAxel Dörfler			PartitionMap.cpp
1465af32e75SAxel Dörfler			PartitionMapParser.cpp
1475af32e75SAxel Dörfler			;
1485af32e75SAxel Dörfler
1495af32e75SAxel Dörfler		# Tell Jam where to find the utility sources
1503a7e0b00SIngo Weinhold		SEARCH on [ FGristFiles kernel_cpp.cpp list.cpp ring_buffer.cpp StringHash.cpp ]
151338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
1525af32e75SAxel Dörfler
1539e8dc2a9SIngo Weinhold		SEARCH on [ FGristFiles KMessage.cpp ]
1549e8dc2a9SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
1559e8dc2a9SIngo Weinhold
15689294b50SAxel Dörfler		SEARCH on [ FGristFiles safemode_settings.cpp ]
15789294b50SAxel Dörfler			= [ FDirName $(HAIKU_TOP) src system kernel debug ] ;
15889294b50SAxel Dörfler
15985db3873SIngo Weinhold		SEARCH on [ FGristFiles driver_settings.cpp ]
160338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src system libroot os ] ;
1615af32e75SAxel Dörfler
1625af32e75SAxel Dörfler		SEARCH on [ FGristFiles amiga_rdb.cpp ]
163338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ;
1645af32e75SAxel Dörfler
1655af32e75SAxel Dörfler		SEARCH on [ FGristFiles apple.cpp ]
166338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ;
1675af32e75SAxel Dörfler
168ed7204faSAlexander von Gluck IV		SEARCH on [ FGristFiles gpt.cpp Header.cpp crc32.cpp utility.cpp ]
16961ba1259SAxel Dörfler			= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ] ;
170eef8417eSAxel Dörfler
1715af32e75SAxel Dörfler		SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ]
172338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ;
1735af32e75SAxel Dörfler
1745af32e75SAxel Dörfler		SEARCH on [ FGristFiles stage2_crt0.S ]
175*c4eec9f1SAugustin Cavalier			= [ FDirName $(HAIKU_TOP) src system boot arch $(TARGET_KERNEL_ARCH_DIR) ] ;
1765af32e75SAxel Dörfler
17732832cbeSIngo Weinhold		SEARCH on [ FGristFiles DataIO.cpp Referenceable.cpp ]
17830572237SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src kits support ] ;
1791f96a3cbSJessica Hamilton	}
1801f96a3cbSJessica Hamilton}
1815af32e75SAxel Dörfler
182338b8dc3SIngo WeinholdSubInclude HAIKU_TOP src system boot loader file_systems ;
183d561d0adSIngo WeinholdSubInclude HAIKU_TOP src system boot loader net ;
184