SubDir OBOS_TOP src tests kernel boot heap ;

UsePublicHeaders support ;
UsePrivateHeaders kernel ;

SubDirHdrs $(OBOS_TOP) headers private kernel arch $(OBOS_ARCH) ;
SubDirHdrs $(OBOS_TOP) headers private kernel boot platform $(OBOS_BOOT_PLATFORM) ;

ObjectDefines heap.cpp : malloc=heap_malloc free=heap_free realloc=heap_realloc HEAP_TEST=1 ;

# This lets the correct stdio.h header be available
# on the build platform.
# This will be fixed with the move to GNU's stdio header
if $(OS) = "LINUX" {
	SubDirC++Flags -include /usr/include/stdio.h ;
} else {
	SubDirC++Flags -include /boot/develop/headers/posix/stdio.h ;
}

BuildPlatformTest heapTest :
	heapTest.cpp

	heap.cpp
	:
	;

# Tell Jam where to find the utility sources
SEARCH on [ FGristFiles 
		heap.cpp
	] = [ FDirName $(OBOS_TOP) src kernel boot loader ] ;

