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