xref: /haiku/src/system/boot/loader/Jamfile (revision 508f54795f39c3e7552d87c95aae9dd8ec6f505b)
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	local 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	defines = [ FDefines $(defines) ] ;
49	SubDirCcFlags $(defines) -Wall -Wno-multichar ;
50	SubDirC++Flags $(defines) -Wall -Wno-multichar -fno-rtti ;
51}
52
53KernelStaticLibrary boot_loader :
54	elf.cpp
55	heap.cpp
56	kernel_args.cpp
57	load_driver_settings.cpp
58	loader.cpp
59	main.cpp
60	menu.cpp
61	pager.cpp
62	partitions.cpp
63	RootFileSystem.cpp
64	stdio.cpp
65	vfs.cpp
66	vm.cpp
67
68	# libroot
69	driver_settings.cpp
70
71	# utils
72	kernel_cpp.cpp
73	KMessage.cpp
74	list.cpp
75	ring_buffer.cpp
76	safemode_settings.cpp
77
78	: -fno-pic
79	;
80
81# The partition support is built in an extra static library
82# so that only the ones that are used will be included.
83
84KernelStaticLibrary boot_partitions :
85	FileMapDisk.cpp
86	amiga_rdb.cpp
87	apple.cpp
88	efi_gpt.cpp
89	intel.cpp
90	PartitionMap.cpp
91	PartitionMapParser.cpp
92	: -fno-pic
93	;
94
95# Tell Jam where to find the utility sources
96SEARCH on [ FGristFiles kernel_cpp.cpp list.cpp ring_buffer.cpp ]
97    = [ FDirName $(HAIKU_TOP) src system kernel util ] ;
98
99SEARCH on [ FGristFiles KMessage.cpp ]
100    = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
101
102SEARCH on [ FGristFiles safemode_settings.cpp ]
103    = [ FDirName $(HAIKU_TOP) src system kernel debug ] ;
104
105SEARCH on [ FGristFiles driver_settings.cpp ]
106    = [ FDirName $(HAIKU_TOP) src system libroot os ] ;
107
108SEARCH on [ FGristFiles amiga_rdb.cpp ]
109    = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems amiga ] ;
110
111SEARCH on [ FGristFiles apple.cpp ]
112    = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems apple ] ;
113
114SEARCH on [ FGristFiles efi_gpt.cpp ]
115    = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems efi ] ;
116
117SEARCH on [ FGristFiles intel.cpp PartitionMap.cpp PartitionMapParser.cpp ]
118    = [ FDirName $(HAIKU_TOP) src add-ons kernel partitioning_systems intel ] ;
119
120SEARCH on [ FGristFiles stage2_crt0.S ]
121    = [ FDirName $(HAIKU_TOP) src system boot arch $(TARGET_ARCH) ] ;
122
123
124SubInclude HAIKU_TOP src system boot loader file_systems ;
125SubInclude HAIKU_TOP src system boot loader net ;
126