xref: /haiku/src/tools/makebootable/platform/bios_ia32/Jamfile (revision 239222b2369c39dc52df52b0a7cdd6cc0a91bc92)
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 system ;
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	hostPlatformSources = PartitionMap.cpp PartitionMapParser.cpp ;
16
17	SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons kernel
18		partitioning_systems intel ] ;
19
20	DEFINES += _USER_MODE ;
21}
22
23# Write the stage 1 boot loader into the makebootable resources. On Darwin
24# resources don't seem to work; there we use an attribute instead.
25if $(HOST_PLATFORM) != darwin && $(HOST_PLATFORM) != cygwin
26	&& $(HOST_PLATFORM) != sunos {
27	AddFileDataResource <build>makebootable : RAWT:666:BootCode : stage1.bin ;
28}
29
30BuildPlatformMain <build>makebootable :
31	makebootable.cpp
32	$(hostPlatformSources)
33	: $(HOST_LIBBE) $(HOST_LIBSTDC++) $(HOST_LIBSUPC++)
34;
35
36# on Darwin write the boot loader code into an attribute
37if $(HOST_PLATFORM) = darwin || $(HOST_PLATFORM) = cygwin
38	|| $(HOST_PLATFORM) = sunos {
39	AddFileDataAttribute <build>makebootable : BootCode : raw : stage1.bin ;
40}
41