Files
haiku-beta6/src/build/libroot/Jamfile
T
Augustin Cavalier 6aff37d1c7 Move SHA256 class to libroot instead of linking libshared into libroot.
Discussed with PulkoMandy and on the haiku-commits mailing list.

Thanks to @jessicah for compile-testing and fixing 2 small issues I missed.
2017-10-03 20:18:26 -04:00

107 lines
2.8 KiB
Plaintext

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 ;
{
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 ;
}
if $(HOST_PLATFORM) = darwin {
hostPlatformSources = fs_darwin.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
SHA256.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++)
;
# 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 ;
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 SHA256.cpp ]
= [ FDirName $(HAIKU_TOP) src system libroot posix crypt ] ;
SEARCH on [ FGristFiles KMessage.cpp ]
= [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;