xref: /haiku/src/system/boot/loader/Jamfile (revision 850f2d1e58cc443f77353c7fc0ce0c158c1fd328)
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	DataIO.cpp
87	Referenceable.cpp
88
89	: -fno-pic
90	;
91
92# The partition support is built in an extra static library
93# so that only the ones that are used will be included.
94
95BootStaticLibrary boot_partitions :
96	FileMapDisk.cpp
97	amiga_rdb.cpp
98	apple.cpp
99
100	efi_gpt.cpp
101	Header.cpp
102	crc32.cpp
103	utility.cpp
104
105	intel.cpp
106	PartitionMap.cpp
107	PartitionMapParser.cpp
108	: -fno-pic
109	;
110
111# Tell Jam where to find the utility sources
112SEARCH on [ FGristFiles kernel_cpp.cpp list.cpp ring_buffer.cpp StringHash.cpp ]
113    = [ FDirName $(HAIKU_TOP) src system kernel util ] ;
114
115SEARCH on [ FGristFiles KMessage.cpp ]
116    = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
117
118SEARCH on [ FGristFiles safemode_settings.cpp ]
119    = [ FDirName $(HAIKU_TOP) src system kernel debug ] ;
120
121SEARCH on [ FGristFiles driver_settings.cpp ]
122    = [ FDirName $(HAIKU_TOP) src system libroot os ] ;
123
124SEARCH on [ FGristFiles amiga_rdb.cpp ]
125    = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ;
126
127SEARCH on [ FGristFiles apple.cpp ]
128    = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ;
129
130SEARCH on [ FGristFiles efi_gpt.cpp Header.cpp crc32.cpp utility.cpp ]
131    = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems gpt ] ;
132
133SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ]
134    = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ;
135
136SEARCH on [ FGristFiles stage2_crt0.S ]
137    = [ FDirName $(HAIKU_TOP) src system boot arch $(TARGET_KERNEL_ARCH) ] ;
138
139SEARCH on [ FGristFiles DataIO.cpp Referenceable.cpp ]
140    = [ FDirName $(HAIKU_TOP) src kits support ] ;
141
142
143SubInclude HAIKU_TOP src system boot loader file_systems ;
144SubInclude HAIKU_TOP src system boot loader net ;
145