1 # Set anyboot file name and directory defaults.
2 HAIKU_ANYBOOT_NAME ?= $(HAIKU_DEFAULT_ANYBOOT_NAME) ;
3 HAIKU_ANYBOOT_DIR ?= $(HAIKU_DEFAULT_ANYBOOT_DIR) ;
4 HAIKU_ANYBOOT = $(HAIKU_ANYBOOT_NAME) ;
5 HAIKU_ANYBOOT_LABEL ?= $(HAIKU_DEFAULT_ANYBOOT_LABEL) ;
7 rule BuildAnybootImage anybootImage : mbrPart : isoPart : imageFile {
8 local anyboot = <build>anyboot ;
10 Depends $(anybootImage) : $(anyboot) ;
11 Depends $(anybootImage) : $(isoPart) ;
12 Depends $(anybootImage) : $(mbrPart) ;
13 Depends $(anybootImage) : $(imageFile) ;
15 BuildAnybootImage1 $(anybootImage) : $(anyboot) $(mbrPart) $(isoPart) $(imageFile) ;
18 actions BuildAnybootImage1 {
19 $(2[1]) -b $(2[2]) $(2[3]) $(2[4]) $(1)
22 local baseMBR = base_mbr.bin ;
23 local mbrSource = [ FDirName $(HAIKU_TOP) src bin writembr mbr.S ] ;
24 BuildMBR $(baseMBR) : $(mbrSource) ;
25 MakeLocate $(baseMBR) : $(HAIKU_OUTPUT_DIR) ;
26 MakeLocate $(HAIKU_ANYBOOT) : $(HAIKU_ANYBOOT_DIR) ;
27 BuildAnybootImage $(HAIKU_ANYBOOT) : $(baseMBR) : $(HAIKU_CD_BOOT_IMAGE)
28 : $(HAIKU_IMAGE_NAME) ;
30 # TODO: this one seems to cause the build to fail each other run (caching?)
31 #RmTemps $(HAIKU_ANYBOOT) : $(baseMBR) ;
32 RmTemps $(HAIKU_ANYBOOT) : $(HAIKU_CD_BOOT_IMAGE) ;
33 RmTemps $(HAIKU_ANYBOOT) : $(HAIKU_IMAGE_NAME) ;
34 RmTemps $(HAIKU_ANYBOOT) : $(HAIKU_BOOT_FLOPPY) ;
36 NotFile haiku-anyboot-image ;
37 Depends haiku-anyboot-image : $(HAIKU_ANYBOOT) ;