2010-03-16 02:51:45 +03:00
|
|
|
# Set anyboot file name and directory defaults.
|
|
|
|
HAIKU_ANYBOOT_NAME ?= $(HAIKU_DEFAULT_ANYBOOT_NAME) ;
|
|
|
|
HAIKU_ANYBOOT_DIR ?= $(HAIKU_DEFAULT_ANYBOOT_DIR) ;
|
|
|
|
HAIKU_ANYBOOT = $(HAIKU_ANYBOOT_NAME) ;
|
|
|
|
HAIKU_ANYBOOT_LABEL ?= $(HAIKU_DEFAULT_ANYBOOT_LABEL) ;
|
|
|
|
|
2010-02-28 21:54:16 +03:00
|
|
|
rule BuildAnybootMBR binary : source {
|
2010-03-02 03:53:41 +03:00
|
|
|
Depends $(binary) : $(source) ;
|
|
|
|
|
2010-02-28 21:54:16 +03:00
|
|
|
MBR_SOURCE on $(binary) = $(source) ;
|
|
|
|
|
|
|
|
BuildAnybootMBR1 $(binary) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
actions BuildAnybootMBR1 {
|
|
|
|
$(RM) $(1)
|
2014-03-29 04:03:51 +04:00
|
|
|
$(HAIKU_NASM) -f bin $(MBR_SOURCE) -O5 -o $(1)
|
2010-02-28 21:54:16 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
rule BuildAnybootImage anybootImage : mbrPart : isoPart : imageFile {
|
|
|
|
local anyboot = <build>anyboot ;
|
|
|
|
|
|
|
|
Depends $(anybootImage) : $(anyboot) ;
|
|
|
|
Depends $(anybootImage) : $(isoPart) ;
|
|
|
|
Depends $(anybootImage) : $(mbrPart) ;
|
|
|
|
Depends $(anybootImage) : $(imageFile) ;
|
|
|
|
|
|
|
|
BuildAnybootImage1 $(anybootImage) : $(anyboot) $(isoPart) $(mbrPart) $(imageFile) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
actions BuildAnybootImage1 {
|
|
|
|
$(2[1]) $(1) $(2[2]) $(2[3]) $(2[4])
|
|
|
|
}
|
|
|
|
|
2010-03-16 02:51:45 +03:00
|
|
|
local baseMBR = base_mbr.bin ;
|
|
|
|
local mbrSource = [ FDirName $(HAIKU_TOP) src bin writembr mbr.S ] ;
|
|
|
|
BuildAnybootMBR $(baseMBR) : $(mbrSource) ;
|
|
|
|
MakeLocate $(baseMBR) : $(HAIKU_OUTPUT_DIR) ;
|
|
|
|
MakeLocate $(HAIKU_ANYBOOT) : $(HAIKU_ANYBOOT_DIR) ;
|
|
|
|
BuildAnybootImage $(HAIKU_ANYBOOT) : $(baseMBR) : $(HAIKU_CD_BOOT_IMAGE)
|
2010-02-28 21:54:16 +03:00
|
|
|
: $(HAIKU_IMAGE_NAME) ;
|
|
|
|
|
|
|
|
# TODO: this one seems to cause the build to fail each other run (caching?)
|
2010-03-16 02:51:45 +03:00
|
|
|
#RmTemps $(HAIKU_ANYBOOT) : $(baseMBR) ;
|
|
|
|
RmTemps $(HAIKU_ANYBOOT) : $(HAIKU_CD_BOOT_IMAGE) ;
|
|
|
|
RmTemps $(HAIKU_ANYBOOT) : $(HAIKU_IMAGE_NAME) ;
|
|
|
|
RmTemps $(HAIKU_ANYBOOT) : $(HAIKU_BOOT_FLOPPY) ;
|
2010-02-28 21:54:16 +03:00
|
|
|
|
|
|
|
NotFile haiku-anyboot-image ;
|
2010-03-16 02:51:45 +03:00
|
|
|
Depends haiku-anyboot-image : $(HAIKU_ANYBOOT) ;
|