xref: /haiku/src/system/boot/loader/Jamfile (revision 4865dc8736b7a57ef166bfe2d32e963bbeb28934)
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 ;
561790bdbSJérôme DuvalSubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems common ;
661ba1259SAxel DörflerSubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ;
7338b8dc3SIngo WeinholdSubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ;
86b202f4eSIngo WeinholdUsePrivateKernelHeaders ;
95af32e75SAxel DörflerUsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
106b202f4eSIngo WeinholdUsePrivateHeaders [ FDirName kernel util ] ;
116b202f4eSIngo WeinholdUsePrivateHeaders shared storage ;
125af32e75SAxel Dörfler
131f96a3cbSJessica Hamiltonlocal defines = $(DEFINES) ;
141f96a3cbSJessica Hamilton
151f96a3cbSJessica Hamiltonlocal platform ;
161f96a3cbSJessica Hamiltonfor platform in [ MultiBootSubDirSetup ] {
171f96a3cbSJessica Hamilton	on $(platform) {
185af32e75SAxel Dörfler		{
191f96a3cbSJessica Hamilton			DEFINES = $(defines) ;
201f96a3cbSJessica Hamilton
2130572237SIngo Weinhold			DEFINES +=
22c4eec9f1SAugustin 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
42c4eec9f1SAugustin 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\\\"
57c06e68d0SAxel Dörfler						BOOT_SUPPORT_PARTITION_EFI
58c06e68d0SAxel Dörfler
599e90c30eSAxel Dörfler						#BOOT_SUPPORT_FILE_SYSTEM_FAT
60c06e68d0SAxel Dörfler					;
61182eaee9SDavid Karoly
6235fad4a4SAlexander von Gluck IV					if $(TARGET_BOOT_PLATFORM) != efi {
6303c037b9SJérôme Duval						DEFINES +=
64c2dcf106SAlexander von Gluck IV							_BOOT_PLATFORM_BIOS
6503c037b9SJérôme Duval							BOOT_SUPPORT_ELF32
66182eaee9SDavid Karoly							BOOT_SUPPORT_ELF64
6703c037b9SJérôme Duval						;
68c2dcf106SAlexander von Gluck IV					} else {
69c2dcf106SAlexander von Gluck IV						if $(TARGET_ARCH) = x86_64 {
70c2dcf106SAlexander von Gluck IV							DEFINES += BOOT_SUPPORT_ELF64 ;
71c2dcf106SAlexander von Gluck IV						} else {
72c2dcf106SAlexander von Gluck IV							DEFINES += BOOT_SUPPORT_ELF32 ;
73c2dcf106SAlexander von Gluck IV						}
7425fa3b1bSJessica Hamilton					}
75ddf7e72fSPulkoMandy				}
76ddf7e72fSPulkoMandy				case "sparc" :
77ddf7e72fSPulkoMandy				{
7835fad4a4SAlexander von Gluck IV					DEFINES += BOOT_SUPPORT_ELF64 ;
79ddf7e72fSPulkoMandy				}
80170aff0aSAlexander von Gluck IV				case "riscv64" :
81ddf7e72fSPulkoMandy				{
8235fad4a4SAlexander von Gluck IV					DEFINES += BOOT_SUPPORT_ELF64 ;
83ddf7e72fSPulkoMandy				}
84ddf7e72fSPulkoMandy				case "m68k" :
85ddf7e72fSPulkoMandy				{
86ddf7e72fSPulkoMandy					DEFINES += BOOT_SUPPORT_ELF32 ;
87ddf7e72fSPulkoMandy				}
88ddf7e72fSPulkoMandy				case "arm" :
89ddf7e72fSPulkoMandy				{
90ddf7e72fSPulkoMandy					DEFINES += BOOT_SUPPORT_ELF32 ;
91ddf7e72fSPulkoMandy				}
925e567c10SFredrik Holmqvist				case "arm64" :
935e567c10SFredrik Holmqvist				{
945e567c10SFredrik Holmqvist					DEFINES += BOOT_SUPPORT_ELF64 ;
955e567c10SFredrik Holmqvist				}
96ddf7e72fSPulkoMandy			}
9725fa3b1bSJessica Hamilton
9830572237SIngo Weinhold			local kernelC++Header = [ FDirName $(HAIKU_TOP) headers private kernel util
9930572237SIngo Weinhold				kernel_cpp.h ] ;
10030572237SIngo Weinhold
10130572237SIngo Weinhold			SubDirC++Flags -fno-rtti -include $(kernelC++Header) ;
1025af32e75SAxel Dörfler		}
1035af32e75SAxel Dörfler
10430572237SIngo Weinhold
1051f96a3cbSJessica Hamilton		BootStaticLibrary [ MultiBootGristFiles boot_loader ] :
106560961eeSMurai Takashi			PathBlocklist.cpp
1075af32e75SAxel Dörfler			elf.cpp
10828a2172cSIngo Weinhold			heap.cpp
1095af32e75SAxel Dörfler			kernel_args.cpp
1105af32e75SAxel Dörfler			load_driver_settings.cpp
11128a2172cSIngo Weinhold			loader.cpp
11228a2172cSIngo Weinhold			main.cpp
11328a2172cSIngo Weinhold			menu.cpp
1145c0f8450SIngo Weinhold			package_support.cpp
11528a2172cSIngo Weinhold			pager.cpp
11628a2172cSIngo Weinhold			partitions.cpp
11728a2172cSIngo Weinhold			RootFileSystem.cpp
11828a2172cSIngo Weinhold			stdio.cpp
1192ca24be6SDavid Karoly			system_revision.c
12028a2172cSIngo Weinhold			vfs.cpp
121*4865dc87SAugustin Cavalier			misc.cpp
1225af32e75SAxel Dörfler
1235af32e75SAxel Dörfler			# libroot
12485db3873SIngo Weinhold			driver_settings.cpp
1255af32e75SAxel Dörfler
1265af32e75SAxel Dörfler			# utils
1275af32e75SAxel Dörfler			kernel_cpp.cpp
1289e8dc2a9SIngo Weinhold			KMessage.cpp
129bd185b41SIngo Weinhold			list.cpp
13028a2172cSIngo Weinhold			ring_buffer.cpp
13189294b50SAxel Dörfler			safemode_settings.cpp
1323a7e0b00SIngo Weinhold			StringHash.cpp
1335af32e75SAxel Dörfler
13432832cbeSIngo Weinhold			DataIO.cpp
13530572237SIngo Weinhold			Referenceable.cpp
1365af32e75SAxel Dörfler			;
1375af32e75SAxel Dörfler
1385af32e75SAxel Dörfler		# The partition support is built in an extra static library
1395af32e75SAxel Dörfler		# so that only the ones that are used will be included.
1405af32e75SAxel Dörfler
1411f96a3cbSJessica Hamilton		BootStaticLibrary [ MultiBootGristFiles boot_partitions ] :
142f335531bSFrançois Revol			FileMapDisk.cpp
1435af32e75SAxel Dörfler			amiga_rdb.cpp
1445af32e75SAxel Dörfler			apple.cpp
145ab313893SAxel Dörfler
146ed7204faSAlexander von Gluck IV			gpt.cpp
147ab313893SAxel Dörfler			Header.cpp
148ab313893SAxel Dörfler			crc32.cpp
149ab313893SAxel Dörfler			utility.cpp
150ab313893SAxel Dörfler
1515af32e75SAxel Dörfler			intel.cpp
1525af32e75SAxel Dörfler			PartitionMapParser.cpp
15361790bdbSJérôme Duval
15461790bdbSJérôme Duval			PartitionMap.cpp
1555af32e75SAxel Dörfler			;
1565af32e75SAxel Dörfler
1575af32e75SAxel Dörfler		# Tell Jam where to find the utility sources
1583a7e0b00SIngo Weinhold		SEARCH on [ FGristFiles kernel_cpp.cpp list.cpp ring_buffer.cpp StringHash.cpp ]
159338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
1605af32e75SAxel Dörfler
1619e8dc2a9SIngo Weinhold		SEARCH on [ FGristFiles KMessage.cpp ]
1629e8dc2a9SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
1639e8dc2a9SIngo Weinhold
16489294b50SAxel Dörfler		SEARCH on [ FGristFiles safemode_settings.cpp ]
16589294b50SAxel Dörfler			= [ FDirName $(HAIKU_TOP) src system kernel debug ] ;
16689294b50SAxel Dörfler
1672ca24be6SDavid Karoly		SEARCH on [ FGristFiles driver_settings.cpp system_revision.c ]
168338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src system libroot os ] ;
1695af32e75SAxel Dörfler
1705af32e75SAxel Dörfler		SEARCH on [ FGristFiles amiga_rdb.cpp ]
171338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ;
1725af32e75SAxel Dörfler
1735af32e75SAxel Dörfler		SEARCH on [ FGristFiles apple.cpp ]
174338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ;
1755af32e75SAxel Dörfler
176ed7204faSAlexander von Gluck IV		SEARCH on [ FGristFiles gpt.cpp Header.cpp crc32.cpp utility.cpp ]
17761ba1259SAxel Dörfler			= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ] ;
178eef8417eSAxel Dörfler
17961790bdbSJérôme Duval		SEARCH on [ FGristFiles intel.cpp PartitionMapParser.cpp ]
180338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ;
1815af32e75SAxel Dörfler
18261790bdbSJérôme Duval		SEARCH on [ FGristFiles PartitionMap.cpp ]
18361790bdbSJérôme Duval			= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems common ] ;
18461790bdbSJérôme Duval
1855af32e75SAxel Dörfler		SEARCH on [ FGristFiles stage2_crt0.S ]
186c4eec9f1SAugustin Cavalier			= [ FDirName $(HAIKU_TOP) src system boot arch $(TARGET_KERNEL_ARCH_DIR) ] ;
1875af32e75SAxel Dörfler
18832832cbeSIngo Weinhold		SEARCH on [ FGristFiles DataIO.cpp Referenceable.cpp ]
18930572237SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src kits support ] ;
1901f96a3cbSJessica Hamilton	}
1911f96a3cbSJessica Hamilton}
1925af32e75SAxel Dörfler
193338b8dc3SIngo WeinholdSubInclude HAIKU_TOP src system boot loader file_systems ;
194d561d0adSIngo WeinholdSubInclude HAIKU_TOP src system boot loader net ;
195