xref: /haiku/src/system/boot/loader/Jamfile (revision ed7204fad26a97ef873402c0be74928e80b63e8a)
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
33c06e68d0SAxel Dörfler			# Add architecture specific partition/file system modules
34c06e68d0SAxel Dörfler
35da80a050SAlex Smith			switch $(TARGET_KERNEL_ARCH) {
36c06e68d0SAxel Dörfler				case "ppc" :
37c06e68d0SAxel Dörfler				{
3830572237SIngo Weinhold					DEFINES +=
3909b40d16SYnoga						BOOT_SUPPORT_ELF32 #How to deal with PPC970 ?
40c06e68d0SAxel Dörfler						BOOT_SUPPORT_PARTITION_AMIGA
41c06e68d0SAxel Dörfler						BOOT_SUPPORT_PARTITION_APPLE
42c06e68d0SAxel Dörfler
43c06e68d0SAxel Dörfler						BOOT_SUPPORT_FILE_SYSTEM_AMIGA_FFS
44c06e68d0SAxel Dörfler					;
45c06e68d0SAxel Dörfler				}
46c06e68d0SAxel Dörfler				case "x86" :
47c06e68d0SAxel Dörfler				{
4830572237SIngo Weinhold					DEFINES +=
497417d5edSAlex Smith						ALTERNATE_BOOT_ARCH=\\\"x86_64\\\"
50f6a34444SAlex Smith						BOOT_SUPPORT_ELF64
517417d5edSAlex Smith
52c06e68d0SAxel Dörfler						BOOT_SUPPORT_PARTITION_EFI
53c06e68d0SAxel Dörfler
549e90c30eSAxel Dörfler						#BOOT_SUPPORT_FILE_SYSTEM_FAT
55c06e68d0SAxel Dörfler					;
561f96a3cbSJessica Hamilton					if $(TARGET_BOOT_PLATFORM) = efi {
57b3215a62SHenry Harrington						DEFINES +=
58b3215a62SHenry Harrington							_BOOT_PLATFORM_EFI
59b3215a62SHenry Harrington						;
60ddf7e72fSPulkoMandy					} else {
6125fa3b1bSJessica Hamilton						DEFINES += BOOT_SUPPORT_ELF32 ;
6225fa3b1bSJessica Hamilton					}
63ddf7e72fSPulkoMandy				}
64ddf7e72fSPulkoMandy				case "sparc" :
65ddf7e72fSPulkoMandy				{
66ddf7e72fSPulkoMandy					DEFINES +=
67ddf7e72fSPulkoMandy						BOOT_SUPPORT_ELF64
68ddf7e72fSPulkoMandy					;
69ddf7e72fSPulkoMandy				}
70ddf7e72fSPulkoMandy				case "risc-v" :
71ddf7e72fSPulkoMandy				{
72ddf7e72fSPulkoMandy					DEFINES +=
73ddf7e72fSPulkoMandy						BOOT_SUPPORT_ELF64
74ddf7e72fSPulkoMandy					;
75ddf7e72fSPulkoMandy				}
76ddf7e72fSPulkoMandy				case "m68k" :
77ddf7e72fSPulkoMandy				{
78ddf7e72fSPulkoMandy					DEFINES += BOOT_SUPPORT_ELF32 ;
79ddf7e72fSPulkoMandy				}
80ddf7e72fSPulkoMandy				case "arm" :
81ddf7e72fSPulkoMandy				{
82ddf7e72fSPulkoMandy					DEFINES += BOOT_SUPPORT_ELF32 ;
83ddf7e72fSPulkoMandy					if $(TARGET_BOOT_PLATFORM) = efi {
84ddf7e72fSPulkoMandy						DEFINES +=
85ddf7e72fSPulkoMandy							_BOOT_PLATFORM_EFI
86ddf7e72fSPulkoMandy						;
87ddf7e72fSPulkoMandy					}
88ddf7e72fSPulkoMandy				}
89ddf7e72fSPulkoMandy			}
9025fa3b1bSJessica Hamilton
9130572237SIngo Weinhold			local kernelC++Header = [ FDirName $(HAIKU_TOP) headers private kernel util
9230572237SIngo Weinhold				kernel_cpp.h ] ;
9330572237SIngo Weinhold
9430572237SIngo Weinhold			SubDirC++Flags -fno-rtti -include $(kernelC++Header) ;
955af32e75SAxel Dörfler		}
965af32e75SAxel Dörfler
9730572237SIngo Weinhold
981f96a3cbSJessica Hamilton		BootStaticLibrary [ MultiBootGristFiles boot_loader ] :
99c04f3a62SIngo Weinhold			PathBlacklist.cpp
1005af32e75SAxel Dörfler			elf.cpp
10128a2172cSIngo Weinhold			heap.cpp
1025af32e75SAxel Dörfler			kernel_args.cpp
1035af32e75SAxel Dörfler			load_driver_settings.cpp
10428a2172cSIngo Weinhold			loader.cpp
10528a2172cSIngo Weinhold			main.cpp
10628a2172cSIngo Weinhold			menu.cpp
1075c0f8450SIngo Weinhold			package_support.cpp
10828a2172cSIngo Weinhold			pager.cpp
10928a2172cSIngo Weinhold			partitions.cpp
11028a2172cSIngo Weinhold			RootFileSystem.cpp
11128a2172cSIngo Weinhold			stdio.cpp
11228a2172cSIngo Weinhold			vfs.cpp
11328a2172cSIngo Weinhold			vm.cpp
1145af32e75SAxel Dörfler
1155af32e75SAxel Dörfler			# libroot
11685db3873SIngo Weinhold			driver_settings.cpp
1175af32e75SAxel Dörfler
1185af32e75SAxel Dörfler			# utils
1195af32e75SAxel Dörfler			kernel_cpp.cpp
1209e8dc2a9SIngo Weinhold			KMessage.cpp
121bd185b41SIngo Weinhold			list.cpp
12228a2172cSIngo Weinhold			ring_buffer.cpp
12389294b50SAxel Dörfler			safemode_settings.cpp
1243a7e0b00SIngo Weinhold			StringHash.cpp
1255af32e75SAxel Dörfler
12632832cbeSIngo Weinhold			DataIO.cpp
12730572237SIngo Weinhold			Referenceable.cpp
1285af32e75SAxel Dörfler			;
1295af32e75SAxel Dörfler
1305af32e75SAxel Dörfler		# The partition support is built in an extra static library
1315af32e75SAxel Dörfler		# so that only the ones that are used will be included.
1325af32e75SAxel Dörfler
1331f96a3cbSJessica Hamilton		BootStaticLibrary [ MultiBootGristFiles boot_partitions ] :
134f335531bSFrançois Revol			FileMapDisk.cpp
1355af32e75SAxel Dörfler			amiga_rdb.cpp
1365af32e75SAxel Dörfler			apple.cpp
137ab313893SAxel Dörfler
138*ed7204faSAlexander von Gluck IV			gpt.cpp
139ab313893SAxel Dörfler			Header.cpp
140ab313893SAxel Dörfler			crc32.cpp
141ab313893SAxel Dörfler			utility.cpp
142ab313893SAxel Dörfler
1435af32e75SAxel Dörfler			intel.cpp
1445af32e75SAxel Dörfler			PartitionMap.cpp
1455af32e75SAxel Dörfler			PartitionMapParser.cpp
1465af32e75SAxel Dörfler			;
1475af32e75SAxel Dörfler
1485af32e75SAxel Dörfler		# Tell Jam where to find the utility sources
1493a7e0b00SIngo Weinhold		SEARCH on [ FGristFiles kernel_cpp.cpp list.cpp ring_buffer.cpp StringHash.cpp ]
150338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
1515af32e75SAxel Dörfler
1529e8dc2a9SIngo Weinhold		SEARCH on [ FGristFiles KMessage.cpp ]
1539e8dc2a9SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
1549e8dc2a9SIngo Weinhold
15589294b50SAxel Dörfler		SEARCH on [ FGristFiles safemode_settings.cpp ]
15689294b50SAxel Dörfler			= [ FDirName $(HAIKU_TOP) src system kernel debug ] ;
15789294b50SAxel Dörfler
15885db3873SIngo Weinhold		SEARCH on [ FGristFiles driver_settings.cpp ]
159338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src system libroot os ] ;
1605af32e75SAxel Dörfler
1615af32e75SAxel Dörfler		SEARCH on [ FGristFiles amiga_rdb.cpp ]
162338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ;
1635af32e75SAxel Dörfler
1645af32e75SAxel Dörfler		SEARCH on [ FGristFiles apple.cpp ]
165338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ;
1665af32e75SAxel Dörfler
167*ed7204faSAlexander von Gluck IV		SEARCH on [ FGristFiles gpt.cpp Header.cpp crc32.cpp utility.cpp ]
16861ba1259SAxel Dörfler			= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ] ;
169eef8417eSAxel Dörfler
1705af32e75SAxel Dörfler		SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ]
171338b8dc3SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ;
1725af32e75SAxel Dörfler
1735af32e75SAxel Dörfler		SEARCH on [ FGristFiles stage2_crt0.S ]
174da80a050SAlex Smith			= [ FDirName $(HAIKU_TOP) src system boot arch $(TARGET_KERNEL_ARCH) ] ;
1755af32e75SAxel Dörfler
17632832cbeSIngo Weinhold		SEARCH on [ FGristFiles DataIO.cpp Referenceable.cpp ]
17730572237SIngo Weinhold			= [ FDirName $(HAIKU_TOP) src kits support ] ;
1781f96a3cbSJessica Hamilton	}
1791f96a3cbSJessica Hamilton}
1805af32e75SAxel Dörfler
181338b8dc3SIngo WeinholdSubInclude HAIKU_TOP src system boot loader file_systems ;
182d561d0adSIngo WeinholdSubInclude HAIKU_TOP src system boot loader net ;
183