SubDir HAIKU_TOP src system boot arch ppc ;

local kernelLibArchObjects =
	<src!system!kernel!lib!arch!$(TARGET_ARCH)>byteorder.o
;

local kernelGenericDriverSources =
	debug_uart.cpp
	debug_uart_8250.cpp
;

local platform ;
for platform in [ MultiBootSubDirSetup openfirmware ] {
    on $(platform) {
		BootMergeObject [ FGristFiles boot_arch_$(TARGET_KERNEL_ARCH).o ] :
			$(kernelGenericDriverSources)
			arch_elf.cpp
			: # additional flags
			:
			$(kernelArchObjects)
			$(kernelLibArchObjects)
		;

		SEARCH on [ FGristFiles arch_elf.cpp arch_uart_8250.cpp ]
		    = [ FDirName $(HAIKU_TOP) src system kernel arch $(TARGET_KERNEL_ARCH_DIR) ] ;

		SEARCH on [ FGristFiles $(kernelGenericDriverSources) ]
			= [ FDirName $(HAIKU_TOP) src system kernel arch generic ] ;
	}
}
