SubDir OBOS_TOP src add-ons kernel file_systems bfs ;

# set some additional defines
{
	local defines =
		KEEP_WRONG_DIRENT_RECLEN
		;

	if $(COMPILE_FOR_R5) {
		defines += COMPILE_FOR_R5 ;
	}

	if $(DEBUG) {
		defines += DEBUG ;
	} else {
		# the gcc on BeOS doesn't compile BFS correctly with -O2 or more
		OPTIM = -O1 ;
	}

	defines = [ FDefines $(defines) ] ;
	SubDirCcFlags $(defines) ;
	SubDirC++Flags $(defines) ;
}

R5KernelAddon obfs : [ FDirName kernel file_systems bfs ] :
	BlockAllocator.cpp
	BPlusTree.cpp
	cpp.cpp
	Debug.cpp
	Index.cpp
	Inode.cpp
	Journal.cpp
	kernel_interface.cpp
	Query.cpp
	Utility.cpp
	Volume.cpp
	BufferPool.cpp
;

rule InstallBFS
{
	Depends $(<) : $(>) ;
}

actions ignore InstallBFS
{
	cp $(>) /boot/home/config/add-ons/kernel/file_systems/
}

InstallBFS install : obfs ;
