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 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 = [ FDefines HAIKU_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 library MakeLocate libroot_build.so : $(HOST_BUILD_COMPATIBILITY_LIB_DIR) ; # darwin already has strlcpy and strlcat in libSystem local strlSources ; if $(HOST_PLATFORM) != darwin { strlSources = strlcpy.c strlcat.c ; } if $(HOST_PLATFORM) = cygwin || $(HOST_PLATFORM) = sunos { strlSources += stpcpy.c strcasestr.c ; } local hostPlatformSources ; if $(HOST_PLATFORM) = freebsd { hostPlatformSources = fs_freebsd.cpp ; } local librootSources = atomic.cpp byteorder.cpp errors.cpp find_directory.cpp fs.cpp fs_attr.cpp fs_descriptors.cpp misc.cpp sem.cpp thread.cpp $(hostPlatformSources) driver_settings.cpp $(strlSources) strnlen.cpp KMessage.cpp ; USES_BE_API on [ FGristFiles $(librootSources:S=$(SUFOBJ)) ] = true ; BuildPlatformSharedLibrary libroot_build.so : $(librootSources) : $(HOST_LIBSUPC++) $(HOST_LIBSTDC++) ; BuildPlatformStaticLibrary libroot_build.a : : [ FGristFiles $(librootSources:S=$(SUFOBJ)) ] ; USES_BE_API on [ FGristFiles function_remapper$(SUFOBJ) ] = true ; 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.cpp ] = [ FDirName $(HAIKU_TOP) src system libroot posix string ] ; SEARCH on [ FGristFiles KMessage.cpp ] = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;