xref: /haiku/src/tools/makebootable/platform/bios_ia32/Jamfile (revision 746cac055adc6ac3308c7bc2d29040fb95689cc9)
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 && $(HOST_PLATFORM) != cygwin
23	&& $(HOST_PLATFORM) != sunos {
24	AddFileDataResource <build>makebootable : RAWT:666:BootCode : stage1.bin ;
25}
26
27BuildPlatformMain <build>makebootable :
28	makebootable.cpp
29	$(hostPlatformSources)
30	: $(HOST_LIBBE) $(HOST_LIBSTDC++) $(HOST_LIBSUPC++)
31;
32
33# on Darwin write the boot loader code into an attribute
34if $(HOST_PLATFORM) = darwin || $(HOST_PLATFORM) = cygwin
35	|| $(HOST_PLATFORM) = sunos {
36	AddFileDataAttribute <build>makebootable : BootCode : raw : stage1.bin ;
37}
38