xref: /haiku/src/build/libroot/Jamfile (revision 922e7ba1f3228e6f28db69b0ded8f86eb32dea17)
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 drivers ] : true ;
7UseHeaders [ FDirName $(HAIKU_TOP) headers build os kernel ] : true ;
8UseHeaders [ FDirName $(HAIKU_TOP) headers build os interface ] : true ;
9UseHeaders [ FDirName $(HAIKU_TOP) headers build os storage ] : true ;
10UseHeaders [ FDirName $(HAIKU_TOP) headers build os support ] : true ;
11
12UsePrivateBuildHeaders kernel libroot ;
13
14{
15	local defines = [ FDefines
16		HAIKU_BUILD_ATTRIBUTES_DIR="\\\"$(HAIKU_BUILD_ATTRIBUTES_DIR)\\\""
17	] ;
18	SubDirCcFlags $(defines) ;
19	SubDirC++Flags $(defines) ;
20
21	local defines = [ FDefines
22		HAIKU_BUILD_GENERATED_DIRECTORY="\\\"$(HAIKU_OUTPUT_DIR)\\\""
23	] ;
24	SubDirC++Flags $(defines) ;
25	ObjectC++Flags find_directory.cpp : $(defines) ;
26}
27
28
29DEFINES += KMESSAGE_CONTAINER_ONLY ;
30ObjectC++Flags KMessage.cpp : $(HOST_BE_API_C++FLAGS) ;
31
32# locate the library
33MakeLocate libroot_build.so : $(HOST_BUILD_COMPATIBILITY_LIB_DIR) ;
34
35# darwin already has strlcpy and strlcat in libSystem
36local strlSources ;
37if $(HOST_PLATFORM) != darwin {
38	strlSources = strlcpy.c strlcat.c ;
39}
40
41if $(HOST_PLATFORM) = cygwin || $(HOST_PLATFORM) = sunos {
42	strlSources += stpcpy.c strcasestr.c ;
43}
44
45local hostPlatformSources ;
46if $(HOST_PLATFORM) = freebsd {
47	hostPlatformSources = fs_freebsd.cpp ;
48}
49
50local librootSources =
51	atomic.cpp
52	byteorder.cpp
53	errors.cpp
54	find_directory.cpp
55	fs.cpp
56	fs_attr.cpp
57	fs_descriptors.cpp
58	misc.cpp
59	sem.cpp
60	thread.cpp
61
62	$(hostPlatformSources)
63
64	driver_settings.cpp
65
66	$(strlSources)
67	strnlen.c
68
69	KMessage.cpp
70;
71
72USES_BE_API on [ FGristFiles $(librootSources:S=$(SUFOBJ)) ] = true ;
73
74BuildPlatformSharedLibrary libroot_build.so :
75	$(librootSources)
76	:
77	$(HOST_LIBSUPC++) $(HOST_LIBSTDC++)
78;
79
80BuildPlatformStaticLibrary libroot_build.a :
81	:
82	[ FGristFiles $(librootSources:S=$(SUFOBJ)) ]
83;
84
85SEARCH on [ FGristFiles driver_settings.cpp ]
86	= [ FDirName $(HAIKU_TOP) src system libroot os ] ;
87SEARCH on [ FGristFiles $(strlSources) strnlen.c ]
88	= [ FDirName $(HAIKU_TOP) src system libroot posix string ] ;
89SEARCH on [ FGristFiles KMessage.cpp ]
90    = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
91