xref: /haiku/src/tools/makebootable/platform/bios_ia32/Jamfile (revision 3995592cdf304335132305e27c40cbb0b1ac46e3)
1SubDir HAIKU_TOP src tools makebootable platform bios_ia32 ;
2
3SubDirHdrs $(HAIKU_TOP) src add-ons kernel file_systems bfs ;
4
5UsePrivateHeaders storage shared ;
6UsePrivateSystemHeaders ;
7
8SEARCH_SOURCE
9	+= [ FDirName $(HAIKU_TOP) src bin makebootable platform bios_ia32 ] ;
10
11USES_BE_API on <build>makebootable = true ;
12
13local hostPlatformSources ;
14if $(HOST_PLATFORM) = linux || $(HOST_PLATFORM) = freebsd || $(HOST_PLATFORM) = darwin {
15	UsePrivateHeaders interface ;
16
17	hostPlatformSources = PartitionMap.cpp PartitionMapParser.cpp
18		PartitionMapWriter.cpp crc32.cpp Header.cpp utility.cpp ;
19
20	SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons kernel
21		partitioning_systems intel ] ;
22	SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons kernel
23		partitioning_systems gpt ] ;
24
25	DEFINES += _USER_MODE ;
26}
27
28# Write the stage 1 boot loader into the makebootable resources. On Darwin
29# resources don't seem to work; there we use an attribute instead.
30if $(HOST_PLATFORM) != darwin && $(HOST_PLATFORM) != cygwin
31	&& $(HOST_PLATFORM) != sunos {
32	AddFileDataResource <build>makebootable : RAWT:666:BootCode : stage1.bin ;
33}
34
35BuildPlatformMain <build>makebootable :
36	makebootable.cpp
37	$(hostPlatformSources)
38	: $(HOST_LIBBE) $(HOST_LIBSTDC++) $(HOST_LIBSUPC++)
39;
40
41# on Darwin write the boot loader code into an attribute
42if $(HOST_PLATFORM) = darwin || $(HOST_PLATFORM) = cygwin
43	|| $(HOST_PLATFORM) = sunos {
44	AddFileDataAttribute <build>makebootable : BootCode : raw : stage1.bin ;
45}
46