xref: /haiku/src/build/libroot/Jamfile (revision b06a48ab8f30b45916a9c157b992827779182163)
1SubDir HAIKU_TOP src build libroot ;
2
3UseHeaders [ FDirName $(HAIKU_TOP) headers build ] : true ;
4UseHeaders [ FDirName $(HAIKU_TOP) headers build os ] : true ;
5UseHeaders [ FDirName $(HAIKU_TOP) headers build os app ] : true ;
6UseHeaders [ FDirName $(HAIKU_TOP) headers build os kernel ] : true ;
7UseHeaders [ FDirName $(HAIKU_TOP) headers build os interface ] : true ;
8UseHeaders [ FDirName $(HAIKU_TOP) headers build os storage ] : true ;
9UseHeaders [ FDirName $(HAIKU_TOP) headers build os support ] : true ;
10
11UseHeaders [ FDirName $(HAIKU_TOP) headers build private kernel ] : true ;
12
13{
14	local defines = [ FDefines
15		HAIKU_BUILD_ATTRIBUTES_DIR="\\\"$(HAIKU_BUILD_ATTRIBUTES_DIR)\\\""
16	] ;
17	SubDirCcFlags $(defines) ;
18	SubDirC++Flags $(defines) ;
19}
20
21# locate the library
22MakeLocate libroot_build.so : $(HOST_BUILD_COMPATIBILITY_LIB_DIR) ;
23
24# darwin already has strlcpy and strlcat in libSystem
25local strlSources ;
26if $(HOST_PLATFORM) != darwin {
27	strlSources = strlcpy.c strlcat.c ;
28}
29
30if $(HOST_PLATFORM) = cygwin || $(HOST_PLATFORM) = sunos {
31	strlSources += stpcpy.c strcasestr.c ;
32}
33
34local hostPlatformSources ;
35if $(HOST_PLATFORM) = freebsd {
36	hostPlatformSources = fs_freebsd.cpp ;
37}
38
39local librootSources =
40	atomic.cpp
41	byteorder.cpp
42	errors.cpp
43	fs.cpp
44	fs_attr.cpp
45	fs_descriptors.cpp
46	misc.cpp
47	sem.cpp
48	thread.cpp
49
50	$(hostPlatformSources)
51
52	$(strlSources)
53	strnlen.c
54;
55
56BuildPlatformSharedLibrary libroot_build.so :
57	$(librootSources)
58	:
59	$(HOST_LIBSUPC++) $(HOST_LIBSTDC++)
60;
61
62BuildPlatformStaticLibrary libroot_build.a :
63	:
64	[ FGristFiles $(librootSources:S=$(SUFOBJ)) ]
65;
66
67SEARCH on [ FGristFiles $(strlSources) strnlen.c ]
68	= [ FDirName $(HAIKU_TOP) src system libroot posix string ] ;
69