haiku/src/system/boot/Jamfile

105 lines
2.3 KiB
Plaintext
Raw Normal View History

SubDir HAIKU_TOP src system boot ;
local librootFunctions =
abs.o
ctype.o
LocaleData.o
qsort.o
kernel_vsprintf.o
memcmp.o
memmove.o
strdup.o
strlen.o
strnlen.o
strcmp.o
strcasecmp.o
strncmp.o
strcat.o
strcpy.o
strlcat.o
strlcpy.o
strchr.o
strrchr.o
strtol.o
;
local extraLinkerArgs = ;
if $(HAIKU_BOARD_LOADER_BASE) {
extraLinkerArgs += --defsym BOARD_LOADER_BASE=$(HAIKU_BOARD_LOADER_BASE) ;
}
AddResources haiku_loader : boot_loader.rdef ;
KernelLd boot_loader_$(TARGET_BOOT_PLATFORM) :
boot_platform_$(TARGET_BOOT_PLATFORM).o
boot_arch_$(TARGET_ARCH).o
boot_loader.a
boot_net.a
boot_partitions.a
# file systems
boot_bfs.a
boot_amiga_ffs.a
boot_tarfs.a
boot_fatfs.a
# needed by tarfs
boot_zlib.a
# libroot functions needed by the stage2 boot loader (compiled for the
# kernel)
$(librootFunctions:G=src!system!kernel!lib)
: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/boot_loader_$(TARGET_BOOT_PLATFORM).ld
: -Bstatic $(extraLinkerArgs)
;
rule BuildCoffLoader {
local coffLoader = $(1) ;
local bootLoader = $(2) ;
# XXX: eventually switch on arch
COFF_FORMAT on $(coffLoader) = xcoff-powermac ;
HACK_COFF on $(coffLoader) = <build>hack-coff ;
Depends $(coffLoader) : <build>hack-coff ;
Depends $(coffLoader) : $(bootLoader) ;
MakeLocateDebug $(coffLoader) ;
}
actions BuildCoffLoader bind HACK_COFF {
rm -f $(1)
$(TARGET_OBJCOPY) -O $(COFF_FORMAT) $(2) $(1)
#$(CP) $(2) $(1)
$(HACK_COFF) $(1)
}
BuildCoffLoader boot_loader_$(TARGET_BOOT_PLATFORM)_coff : boot_loader_$(TARGET_BOOT_PLATFORM) ;
rule BuildBiosLoader {
local haikuLoader = $(1) ;
local bootLoader = $(2) ;
Depends $(haikuLoader) : $(bootLoader) ;
MakeLocateDebug $(haikuLoader) ;
on $(1) ResAttr $(1) : $(RESFILES) : false ;
if ! [ on $(1) return $(DONT_USE_BEOS_RULES) ] {
SetType $(1) ;
MimeSet $(1) ;
}
}
actions BuildBiosLoader {
rm -f $(1)
$(TARGET_OBJCOPY) -O binary $(2) $(1)
}
BuildBiosLoader haiku_loader : boot_loader_$(TARGET_BOOT_PLATFORM) ;
# different target for PXE, to be build with TARGET_BOOT_PLATFORM=pxe_ia32 jam pxehaiku-loader
BuildBiosLoader pxehaiku-loader : boot_loader_$(TARGET_BOOT_PLATFORM) ;
SubInclude HAIKU_TOP src system boot arch $(TARGET_ARCH) ;
SubInclude HAIKU_TOP src system boot loader ;
SubInclude HAIKU_TOP src system boot platform ;