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) != mingw { 31 AddFileDataResource <build>makebootable : RAWT:666:BootCode : stage1.bin ; 32} 33 34BuildPlatformMain <build>makebootable : 35 makebootable.cpp 36 $(hostPlatformSources) 37 : $(HOST_LIBBE) $(HOST_LIBSTDC++) $(HOST_LIBSUPC++) 38; 39 40# on Darwin write the boot loader code into an attribute 41if $(HOST_PLATFORM) = darwin || $(HOST_PLATFORM) = mingw { 42 AddFileDataAttribute <build>makebootable : BootCode : raw : stage1.bin ; 43} 44