SubDir HAIKU_TOP src build libroot ;UseHeaders [ FDirName $(HAIKU_TOP) headers build ] : true ;UseHeaders [ FDirName $(HAIKU_TOP) headers build os ] : true ;UseHeaders [ FDirName $(HAIKU_TOP) headers build os app ] : true ;UseHeaders [ FDirName $(HAIKU_TOP) headers build os drivers ] : true ;UseHeaders [ FDirName $(HAIKU_TOP) headers build os kernel ] : true ;UseHeaders [ FDirName $(HAIKU_TOP) headers build os interface ] : true ;UseHeaders [ FDirName $(HAIKU_TOP) headers build os storage ] : true ;UseHeaders [ FDirName $(HAIKU_TOP) headers build os support ] : true ;UsePrivateBuildHeaders kernel libroot system ;UsePrivateHeaders system ;{local defines = [ FDefines'HAIKU_BUILD_ATTRIBUTES_DIR="\"$(HAIKU_BUILD_ATTRIBUTES_DIR)\""'_HAIKU_BUILD_DONT_REMAP_FD_FUNCTIONS=1] ;SubDirCcFlags $(defines) ;SubDirC++Flags $(defines) ;defines = [ FDefinesHAIKU_BUILD_GENERATED_DIRECTORY="\\\"$(HAIKU_OUTPUT_DIR)\\\""] ;ObjectC++Flags find_directory.cpp : $(defines) ;defines = [ FDefines BUILDING_HAIKU_ERROR_MAPPER=1 ] ;ObjectC++Flags errors.cpp : $(defines) ;defines = [ FDefines KMESSAGE_CONTAINER_ONLY=1 ] ;ObjectC++Flags KMessage.cpp : $(defines) ;}# locate the libraryMakeLocate libroot_build.so : $(HOST_BUILD_COMPATIBILITY_LIB_DIR) ;# darwin already has strlcpy and strlcat in libSystemlocal strlSources ;if $(HOST_PLATFORM) != darwin && $(HOST_PLATFORM) != haiku_host {strlSources = strlcpy.c strlcat.c ;}local hostPlatformSources ;if $(HOST_PLATFORM) = freebsd {hostPlatformSources = fs_freebsd.cpp ;}if $(HOST_PLATFORM) = darwin {hostPlatformSources = fs_darwin.cpp ;}local librootSources =atomic.cppbyteorder.cpperrors.cppfind_directory.cppfs.cppfs_attr.cppfs_descriptors.cppmisc.cppsem.cppthread.cppSHA256.cpp$(hostPlatformSources)driver_settings.cpp$(strlSources)strnlen.cKMessage.cpp;USES_BE_API on [ FGristFiles $(librootSources:S=$(SUFOBJ)) ] = true ;local librootTarget = libroot_build.so ;if $(HAIKU_HOST_USE_XATTR) = 0 {# prevent library from being cleaned when emulated attributes are usedlibrootTarget = <temp>libroot_build.so ;File libroot_build.so : <temp>libroot_build.so ;MODE on libroot_build.so = $(EXEMODE) ;Chmod libroot_build.so ;RmTemps libroot_build.so : <temp>libroot_build.so ;}BuildPlatformSharedLibrary $(librootTarget) :$(librootSources):$(HOST_LIBSUPC++) $(HOST_LIBSTDC++) ;# TODO: This doesn't work with the function remapping.BuildPlatformStaticLibrary libroot_build.a ::[ FGristFiles $(librootSources:S=$(SUFOBJ)) ];USES_BE_API on [ FGristFiles function_remapper$(SUFOBJ) ] = true ;NO_HIDDEN_VISIBILITY on <build>libroot_build_function_remapper.a = 1 ;BuildPlatformStaticLibraryPIC libroot_build_function_remapper.a :function_remapper.cpp;SEARCH on [ FGristFiles driver_settings.cpp ]= [ FDirName $(HAIKU_TOP) src system libroot os ] ;SEARCH on [ FGristFiles $(strlSources) strnlen.c ]= [ FDirName $(HAIKU_TOP) src system libroot posix musl string ] ;SEARCH on [ FGristFiles SHA256.cpp ]= [ FDirName $(HAIKU_TOP) src system libroot posix crypt ] ;SEARCH on [ FGristFiles KMessage.cpp ]= [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;