xref: /haiku/src/system/boot/loader/Jamfile (revision 0d452c8f34013b611a54c746a71c05e28796eae2)
1SubDir HAIKU_TOP src system boot loader ;
2
3SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ;
4SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ;
5SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems efi ;
6SubDirHdrs $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ;
7UsePrivateKernelHeaders ;
8UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
9UsePrivateHeaders [ FDirName kernel util ] ;
10UsePrivateHeaders shared storage ;
11
12{
13	DEFINES +=
14		_BOOT_MODE
15		BOOT_ARCH=\\\"$(TARGET_ARCH)\\\"
16		KMESSAGE_CONTAINER_ONLY
17
18		BOOT_SUPPORT_PARTITION_INTEL
19
20		BOOT_SUPPORT_FILE_SYSTEM_BFS
21		BOOT_SUPPORT_FILE_SYSTEM_TARFS
22		#BOOT_SUPPORT_FILE_MAP_DISK
23		BOOT_SUPPORT_FILE_SYSTEM_FAT
24	;
25
26	# Add architecture specific partition/file system modules
27
28	switch $(TARGET_ARCH) {
29		case "ppc" :
30		{
31			DEFINES +=
32				BOOT_SUPPORT_PARTITION_AMIGA
33				BOOT_SUPPORT_PARTITION_APPLE
34
35				BOOT_SUPPORT_FILE_SYSTEM_AMIGA_FFS
36			;
37		}
38		case "x86" :
39		{
40			DEFINES +=
41				BOOT_SUPPORT_PARTITION_EFI
42
43				#BOOT_SUPPORT_FILE_SYSTEM_FAT
44			;
45		}
46	}
47
48	local kernelC++Header = [ FDirName $(HAIKU_TOP) headers private kernel util
49		kernel_cpp.h ] ;
50
51	SubDirC++Flags -fno-rtti -include $(kernelC++Header) ;
52}
53
54
55KernelStaticLibrary boot_loader :
56	elf.cpp
57	heap.cpp
58	kernel_args.cpp
59	load_driver_settings.cpp
60	loader.cpp
61	main.cpp
62	menu.cpp
63	pager.cpp
64	partitions.cpp
65	RootFileSystem.cpp
66	stdio.cpp
67	vfs.cpp
68	vm.cpp
69
70	# libroot
71	driver_settings.cpp
72
73	# utils
74	kernel_cpp.cpp
75	KMessage.cpp
76	list.cpp
77	ring_buffer.cpp
78	safemode_settings.cpp
79
80	Referenceable.cpp
81
82	: -fno-pic
83	;
84
85# The partition support is built in an extra static library
86# so that only the ones that are used will be included.
87
88KernelStaticLibrary boot_partitions :
89	FileMapDisk.cpp
90	amiga_rdb.cpp
91	apple.cpp
92	efi_gpt.cpp
93	intel.cpp
94	PartitionMap.cpp
95	PartitionMapParser.cpp
96	: -fno-pic
97	;
98
99# Tell Jam where to find the utility sources
100SEARCH on [ FGristFiles kernel_cpp.cpp list.cpp ring_buffer.cpp ]
101    = [ FDirName $(HAIKU_TOP) src system kernel util ] ;
102
103SEARCH on [ FGristFiles KMessage.cpp ]
104    = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
105
106SEARCH on [ FGristFiles safemode_settings.cpp ]
107    = [ FDirName $(HAIKU_TOP) src system kernel debug ] ;
108
109SEARCH on [ FGristFiles driver_settings.cpp ]
110    = [ FDirName $(HAIKU_TOP) src system libroot os ] ;
111
112SEARCH on [ FGristFiles amiga_rdb.cpp ]
113    = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ;
114
115SEARCH on [ FGristFiles apple.cpp ]
116    = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ;
117
118SEARCH on [ FGristFiles efi_gpt.cpp ]
119    = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems efi ] ;
120
121SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ]
122    = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ;
123
124SEARCH on [ FGristFiles stage2_crt0.S ]
125    = [ FDirName $(HAIKU_TOP) src system boot arch $(TARGET_ARCH) ] ;
126
127SEARCH on [ FGristFiles Referenceable.cpp ]
128    = [ FDirName $(HAIKU_TOP) src kits support ] ;
129
130
131SubInclude HAIKU_TOP src system boot loader file_systems ;
132SubInclude HAIKU_TOP src system boot loader net ;
133