xref: /haiku/src/system/kernel/lib/Jamfile (revision 4c8e85b316c35a9161f5a1c50ad70bc91c83a76f)
1SubDir HAIKU_TOP src system kernel lib ;
2
3UsePrivateHeaders shared ;
4UsePrivateHeaders [ FDirName libroot locale ] ;
5UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility gnu ] : true ;
6
7# force inclusion of kernel_lib.h
8local kernelLibHeader = [ FDirName $(SUBDIR) kernel_lib.h ] ;
9CCFLAGS += -include $(kernelLibHeader) ;
10C++FLAGS += -include $(kernelLibHeader) ;
11
12
13local gnuSources = [ FDirName $(HAIKU_TOP) src libs gnu ] ;
14local librootSources = [ FDirName $(HAIKU_TOP) src system libroot ] ;
15local librootOSSources = [ FDirName $(librootSources) os ] ;
16local posixSources = [ FDirName $(librootSources) posix ] ;
17
18
19# kernel libroot os files
20
21local sources =
22	driver_settings.cpp
23	find_directory.cpp
24	fs_info.c
25	system_revision.c
26	wait_for_objects.cpp
27	;
28
29SourceHdrs $(sources) : $(librootOSSources) ;
30
31KernelMergeObject kernel_os_main.o : $(sources)
32	: $(TARGET_KERNEL_PIC_CCFLAGS)
33;
34
35SEARCH on [ FGristFiles $(sources) ]
36	= [ FDirName $(HAIKU_TOP) src system libroot os ] ;
37
38# kernel libroot posix files
39
40SEARCH_SOURCE += [ FDirName $(posixSources) ] ;
41SEARCH_SOURCE += [ FDirName $(posixSources) locale ] ;
42SEARCH_SOURCE += [ FDirName $(posixSources) stdio ] ;
43SEARCH_SOURCE += [ FDirName $(posixSources) stdlib ] ;
44SEARCH_SOURCE += [ FDirName $(posixSources) string ] ;
45SEARCH_SOURCE += [ FDirName $(posixSources) sys ] ;
46SEARCH_SOURCE += [ FDirName $(posixSources) time ] ;
47SEARCH_SOURCE += [ FDirName $(posixSources) unistd ] ;
48SEARCH_SOURCE += [ FDirName $(gnuSources) ] ;
49
50KernelMergeObject kernel_lib_posix.o :
51	# main
52	kernel_errno.cpp
53	dirent.c
54	fcntl.cpp
55	poll.c
56	utime.c
57	# locale
58	ctype.cpp
59	localeconv.cpp
60	LocaleData.cpp
61	# stdio (this subdir)
62	kernel_vsprintf.cpp
63	# stdlib
64	abs.c
65	atoi.c
66	bsearch.c
67	merge.c
68	qsort.c
69	rand.c
70	random.c
71	strtod.c
72	strtol.c
73	strtoll.c
74	strtoul.c
75	strtoull.c
76	# sys
77	chmod.c
78	stat.c
79	mkdir.c
80	select.c
81	gettimeofday.c
82	uio.c
83	# time
84	time.c
85	# unistd
86	access.c
87	chown.c
88	close.c
89	#conf.c
90	directory.c
91	dup.c
92	ioctl.c
93	link.c
94	lseek.c
95	mount.c
96	read.c
97	sync.c
98	truncate.c
99	usergroup.cpp
100	write.c
101	# string
102	ffs.cpp
103	memchr.c
104	memcmp.c
105	memmem.c
106	memmove.c
107	strcasecmp.c
108	strcasestr.c
109	strcat.c
110	strchr.c
111	strcmp.c
112	strcpy.c
113	strcspn.c
114	strdup.cpp
115	strerror.c
116	strlcat.c
117	strlcpy.c
118	strlen.cpp
119	strncat.c
120	strncmp.c
121	strncpy.cpp
122	strndup.cpp
123	strnlen.cpp
124	strpbrk.c
125	strrchr.c
126	strspn.c
127	strstr.c
128	strtok.c
129	strupr.c
130	stpcpy.c
131
132	: $(TARGET_KERNEL_PIC_CCFLAGS)
133;
134
135# misc
136
137SEARCH_SOURCE = [ FDirName $(HAIKU_TOP) src kits support ] ;
138
139KernelMergeObject kernel_misc.o :
140	DataIO.cpp
141	Referenceable.cpp
142
143	: $(TARGET_KERNEL_PIC_CCFLAGS)
144;
145
146HaikuSubInclude arch $(TARGET_ARCH) ;
147HaikuSubInclude zlib ;
148if [ FIsBuildFeatureEnabled zstd ] {
149	HaikuSubInclude zstd ;
150}
151