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