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