xref: /haiku/src/system/boot/loader/Jamfile (revision c2dcf1067665fd73412c74e4f9df90ff48c452f6)
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 +=
225af32e75SAxel Dörfler				_BOOT_MODE
23c4eec9f1SAugustin Cavalier				BOOT_ARCH=\\\"$(TARGET_KERNEL_ARCH_DIR)\\\"
24c06e68d0SAxel Dörfler				KMESSAGE_CONTAINER_ONLY
255af32e75SAxel Dörfler
265af32e75SAxel Dörfler				BOOT_SUPPORT_PARTITION_INTEL
275af32e75SAxel Dörfler
285af32e75SAxel Dörfler				BOOT_SUPPORT_FILE_SYSTEM_BFS
2985a53ea2SAxel Dörfler				BOOT_SUPPORT_FILE_SYSTEM_TARFS
30f335531bSFrançois Revol				#BOOT_SUPPORT_FILE_MAP_DISK
31085cf27bSIngo Weinhold				BOOT_SUPPORT_FILE_SYSTEM_FAT
325af32e75SAxel Dörfler			;
335af32e75SAxel Dörfler
3435fad4a4SAlexander von Gluck IV			if $(TARGET_BOOT_PLATFORM) = efi {
3535fad4a4SAlexander von Gluck IV				DEFINES +=
3635fad4a4SAlexander von Gluck IV					_BOOT_PLATFORM_EFI
3735fad4a4SAlexander von Gluck IV					BOOT_SUPPORT_PARTITION_EFI
3835fad4a4SAlexander von Gluck IV				;
3935fad4a4SAlexander von Gluck IV			}
4035fad4a4SAlexander von Gluck IV
41c06e68d0SAxel Dörfler			# Add architecture specific partition/file system modules
42c06e68d0SAxel Dörfler
43c4eec9f1SAugustin Cavalier			switch $(TARGET_KERNEL_ARCH_DIR) {
44c06e68d0SAxel Dörfler				case "ppc" :
45c06e68d0SAxel Dörfler				{
4630572237SIngo Weinhold					DEFINES +=
4709b40d16SYnoga						BOOT_SUPPORT_ELF32 #How to deal with PPC970 ?
48c06e68d0SAxel Dörfler						BOOT_SUPPORT_PARTITION_AMIGA
49c06e68d0SAxel Dörfler						BOOT_SUPPORT_PARTITION_APPLE
50c06e68d0SAxel Dörfler
51c06e68d0SAxel Dörfler						BOOT_SUPPORT_FILE_SYSTEM_AMIGA_FFS
52c06e68d0SAxel Dörfler					;
53c06e68d0SAxel Dörfler				}
54c06e68d0SAxel Dörfler				case "x86" :
55c06e68d0SAxel Dörfler				{
5630572237SIngo Weinhold					DEFINES +=
577417d5edSAlex Smith						ALTERNATE_BOOT_ARCH=\\\"x86_64\\\"
58c06e68d0SAxel Dörfler						BOOT_SUPPORT_PARTITION_EFI
59c06e68d0SAxel Dörfler
609e90c30eSAxel Dörfler						#BOOT_SUPPORT_FILE_SYSTEM_FAT
61c06e68d0SAxel Dörfler					;
62182eaee9SDavid Karoly
6335fad4a4SAlexander von Gluck IV					if $(TARGET_BOOT_PLATFORM) != efi {
6403c037b9SJérôme Duval						DEFINES +=
65*c2dcf106SAlexander von Gluck IV							_BOOT_PLATFORM_BIOS
6603c037b9SJérôme Duval							BOOT_SUPPORT_ELF32
67182eaee9SDavid Karoly							BOOT_SUPPORT_ELF64
6803c037b9SJérôme Duval						;
69*c2dcf106SAlexander von Gluck IV					} else {
70*c2dcf106SAlexander von Gluck IV						if $(TARGET_ARCH) = x86_64 {
71*c2dcf106SAlexander von Gluck IV							DEFINES += BOOT_SUPPORT_ELF64 ;
72*c2dcf106SAlexander von Gluck IV						} else {
73*c2dcf106SAlexander von Gluck IV							DEFINES += BOOT_SUPPORT_ELF32 ;
74*c2dcf106SAlexander von Gluck IV						}
7525fa3b1bSJessica Hamilton					}
76ddf7e72fSPulkoMandy				}
77ddf7e72fSPulkoMandy				case "sparc" :
78ddf7e72fSPulkoMandy				{
7935fad4a4SAlexander von Gluck IV					DEFINES += BOOT_SUPPORT_ELF64 ;
80ddf7e72fSPulkoMandy				}
81170aff0aSAlexander von Gluck IV				case "riscv64" :
82ddf7e72fSPulkoMandy				{
8335fad4a4SAlexander von Gluck IV					DEFINES += BOOT_SUPPORT_ELF64 ;
84ddf7e72fSPulkoMandy				}
85ddf7e72fSPulkoMandy				case "m68k" :
86ddf7e72fSPulkoMandy				{
87ddf7e72fSPulkoMandy					DEFINES += BOOT_SUPPORT_ELF32 ;
88ddf7e72fSPulkoMandy				}
89ddf7e72fSPulkoMandy				case "arm" :
90ddf7e72fSPulkoMandy				{
91ddf7e72fSPulkoMandy					DEFINES += BOOT_SUPPORT_ELF32 ;
92ddf7e72fSPulkoMandy				}
935e567c10SFredrik Holmqvist				case "arm64" :
945e567c10SFredrik Holmqvist				{
955e567c10SFredrik Holmqvist					DEFINES += BOOT_SUPPORT_ELF64 ;
965e567c10SFredrik Holmqvist				}
97ddf7e72fSPulkoMandy			}
9825fa3b1bSJessica Hamilton
9930572237SIngo Weinhold			local kernelC++Header = [ FDirName $(HAIKU_TOP) headers private kernel util
10030572237SIngo Weinhold				kernel_cpp.h ] ;
10130572237SIngo Weinhold
10230572237SIngo Weinhold			SubDirC++Flags -fno-rtti -include $(kernelC++Header) ;
1035af32e75SAxel Dörfler		}
1045af32e75SAxel Dörfler
10530572237SIngo Weinhold
1061f96a3cbSJessica Hamilton		BootStaticLibrary [ MultiBootGristFiles boot_loader ] :
107560961eeSMurai Takashi			PathBlocklist.cpp
1085af32e75SAxel Dörfler			elf.cpp
10928a2172cSIngo Weinhold			heap.cpp
1105af32e75SAxel Dörfler			kernel_args.cpp
1115af32e75SAxel Dörfler			load_driver_settings.cpp
11228a2172cSIngo Weinhold			loader.cpp
11328a2172cSIngo Weinhold			main.cpp
11428a2172cSIngo Weinhold			menu.cpp
1155c0f8450SIngo Weinhold			package_support.cpp
11628a2172cSIngo Weinhold			pager.cpp
11728a2172cSIngo Weinhold			partitions.cpp
11828a2172cSIngo Weinhold			RootFileSystem.cpp
11928a2172cSIngo Weinhold			stdio.cpp
12028a2172cSIngo Weinhold			vfs.cpp
12128a2172cSIngo Weinhold			vm.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
16785db3873SIngo Weinhold		SEARCH on [ FGristFiles driver_settings.cpp ]
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