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 ; 14local hostPlatformLibs ; 15if $(HOST_PLATFORM) = linux || $(HOST_PLATFORM) = freebsd || $(HOST_PLATFORM) = darwin { 16 UsePrivateHeaders interface ; 17 UseHeaders [ FDirName $(HAIKU_TOP) src libs uuid ] ; 18 19 hostPlatformSources = PartitionMap.cpp PartitionMapParser.cpp 20 crc32.cpp Header.cpp utility.cpp ; 21 hostPlatformLibs = libuuid_build.a ; 22 23 SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons kernel 24 partitioning_systems intel ] ; 25 SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons kernel 26 partitioning_systems gpt ] ; 27 28 DEFINES += _USER_MODE ; 29} 30 31# Write the stage 1 boot loader into the makebootable resources. On Darwin 32# resources don't seem to work; there we use an attribute instead. 33if $(HOST_PLATFORM) != darwin && $(HOST_PLATFORM) != cygwin 34 && $(HOST_PLATFORM) != sunos { 35 AddFileDataResource <build>makebootable : RAWT:666:BootCode : stage1.bin ; 36} 37 38BuildPlatformMain <build>makebootable : 39 makebootable.cpp 40 $(hostPlatformSources) 41 : $(HOST_LIBBE) $(HOST_LIBSTDC++) $(HOST_LIBSUPC++) $(hostPlatformLibs) 42; 43 44# on Darwin write the boot loader code into an attribute 45if $(HOST_PLATFORM) = darwin || $(HOST_PLATFORM) = cygwin 46 || $(HOST_PLATFORM) = sunos { 47 AddFileDataAttribute <build>makebootable : BootCode : raw : stage1.bin ; 48} 49