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