xref: /haiku/src/system/boot/loader/Jamfile (revision 991dadd6324f7b7a68e94743a39ebae789823228)
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 gpt ;
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_KERNEL_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_KERNEL_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				ALTERNATE_BOOT_ARCH=\\\"x86_64\\\"
42				BOOT_SUPPORT_ELF64
43
44				BOOT_SUPPORT_PARTITION_EFI
45
46				#BOOT_SUPPORT_FILE_SYSTEM_FAT
47			;
48		}
49	}
50
51	local kernelC++Header = [ FDirName $(HAIKU_TOP) headers private kernel util
52		kernel_cpp.h ] ;
53
54	SubDirC++Flags -fno-rtti -include $(kernelC++Header) ;
55}
56
57
58BootStaticLibrary boot_loader :
59	PathBlacklist.cpp
60	elf.cpp
61	heap.cpp
62	kernel_args.cpp
63	load_driver_settings.cpp
64	loader.cpp
65	main.cpp
66	menu.cpp
67	package_support.cpp
68	pager.cpp
69	partitions.cpp
70	RootFileSystem.cpp
71	stdio.cpp
72	vfs.cpp
73	vm.cpp
74
75	# libroot
76	driver_settings.cpp
77
78	# utils
79	kernel_cpp.cpp
80	KMessage.cpp
81	list.cpp
82	ring_buffer.cpp
83	safemode_settings.cpp
84	StringHash.cpp
85
86	Referenceable.cpp
87
88	: -fno-pic
89	;
90
91# The partition support is built in an extra static library
92# so that only the ones that are used will be included.
93
94BootStaticLibrary boot_partitions :
95	FileMapDisk.cpp
96	amiga_rdb.cpp
97	apple.cpp
98
99	efi_gpt.cpp
100	Header.cpp
101	crc32.cpp
102	utility.cpp
103
104	intel.cpp
105	PartitionMap.cpp
106	PartitionMapParser.cpp
107	: -fno-pic
108	;
109
110# Tell Jam where to find the utility sources
111SEARCH on [ FGristFiles kernel_cpp.cpp list.cpp ring_buffer.cpp StringHash.cpp ]
112    = [ FDirName $(HAIKU_TOP) src system kernel util ] ;
113
114SEARCH on [ FGristFiles KMessage.cpp ]
115    = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
116
117SEARCH on [ FGristFiles safemode_settings.cpp ]
118    = [ FDirName $(HAIKU_TOP) src system kernel debug ] ;
119
120SEARCH on [ FGristFiles driver_settings.cpp ]
121    = [ FDirName $(HAIKU_TOP) src system libroot os ] ;
122
123SEARCH on [ FGristFiles amiga_rdb.cpp ]
124    = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ;
125
126SEARCH on [ FGristFiles apple.cpp ]
127    = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ;
128
129SEARCH on [ FGristFiles efi_gpt.cpp Header.cpp crc32.cpp utility.cpp ]
130    = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ] ;
131
132SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ]
133    = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ;
134
135SEARCH on [ FGristFiles stage2_crt0.S ]
136    = [ FDirName $(HAIKU_TOP) src system boot arch $(TARGET_KERNEL_ARCH) ] ;
137
138SEARCH on [ FGristFiles Referenceable.cpp ]
139    = [ FDirName $(HAIKU_TOP) src kits support ] ;
140
141
142SubInclude HAIKU_TOP src system boot loader file_systems ;
143SubInclude HAIKU_TOP src system boot loader net ;
144