xref: /haiku/src/system/kernel/lib/Jamfile (revision 46a6070b5792be7cb677dcda67400127b3c921c3)
138f62644SIngo WeinholdSubDir HAIKU_TOP src system kernel lib ;
238f62644SIngo Weinhold
3bcfe344cSIngo WeinholdUsePrivateHeaders shared ;
4a3f66598SOliver TappeUsePrivateHeaders [ FDirName libroot locale ] ;
556d38808SAdrien DestuguesUseHeaders [ FDirName $(HAIKU_TOP) headers compatibility gnu ] : true ;
6bcfe344cSIngo Weinhold
724df6592SIngo Weinhold# force inclusion of kernel_lib.h
824df6592SIngo Weinholdlocal kernelLibHeader = [ FDirName $(SUBDIR) kernel_lib.h ] ;
924df6592SIngo WeinholdCCFLAGS += -include $(kernelLibHeader) ;
1024df6592SIngo WeinholdC++FLAGS += -include $(kernelLibHeader) ;
1124df6592SIngo Weinhold
1224df6592SIngo Weinhold
1356d38808SAdrien Destugueslocal gnuSources = [ FDirName $(HAIKU_TOP) src libs gnu ] ;
1404c6cb37SIngo Weinholdlocal librootSources = [ FDirName $(HAIKU_TOP) src system libroot ] ;
1504c6cb37SIngo Weinholdlocal librootOSSources = [ FDirName $(librootSources) os ] ;
1604c6cb37SIngo Weinholdlocal posixSources = [ FDirName $(librootSources) posix ] ;
1704c6cb37SIngo Weinhold
1804c6cb37SIngo Weinhold
1938f62644SIngo Weinhold# kernel libroot os files
2038f62644SIngo Weinhold
2104c6cb37SIngo Weinholdlocal sources =
2285db3873SIngo Weinhold	driver_settings.cpp
2385db3873SIngo Weinhold	find_directory.cpp
24d9e730c8SPulkoMandy	fs_info.cpp
2522a7fe96SOliver Tappe	system_revision.c
26b2d056ecSIngo Weinhold	wait_for_objects.cpp
2704c6cb37SIngo Weinhold	;
2804c6cb37SIngo Weinhold
2904c6cb37SIngo WeinholdSourceHdrs $(sources) : $(librootOSSources) ;
3004c6cb37SIngo Weinhold
3104c6cb37SIngo WeinholdKernelMergeObject kernel_os_main.o : $(sources)
32957a1b17SIngo Weinhold	: $(TARGET_KERNEL_PIC_CCFLAGS)
3338f62644SIngo Weinhold;
3438f62644SIngo Weinhold
3504c6cb37SIngo WeinholdSEARCH on [ FGristFiles $(sources) ]
3604c6cb37SIngo Weinhold	= [ FDirName $(HAIKU_TOP) src system libroot os ] ;
3738f62644SIngo Weinhold
3838f62644SIngo Weinhold# kernel libroot posix files
3938f62644SIngo Weinhold
4038f62644SIngo WeinholdSEARCH_SOURCE += [ FDirName $(posixSources) ] ;
4138f62644SIngo WeinholdSEARCH_SOURCE += [ FDirName $(posixSources) locale ] ;
4238f62644SIngo WeinholdSEARCH_SOURCE += [ FDirName $(posixSources) stdio ] ;
4338f62644SIngo WeinholdSEARCH_SOURCE += [ FDirName $(posixSources) stdlib ] ;
4438f62644SIngo WeinholdSEARCH_SOURCE += [ FDirName $(posixSources) string ] ;
4538f62644SIngo WeinholdSEARCH_SOURCE += [ FDirName $(posixSources) sys ] ;
4638f62644SIngo WeinholdSEARCH_SOURCE += [ FDirName $(posixSources) time ] ;
4738f62644SIngo WeinholdSEARCH_SOURCE += [ FDirName $(posixSources) unistd ] ;
4856d38808SAdrien DestuguesSEARCH_SOURCE += [ FDirName $(gnuSources) ] ;
4938f62644SIngo Weinhold
500d29def7SAugustin Cavalierlocal muslSources =
510d29def7SAugustin Cavalier	ffs.c
5287be02e1SAugustin Cavalier	rand.c
5387be02e1SAugustin Cavalier	rand_r.c
54*46a6070bSAugustin Cavalier
55*46a6070bSAugustin Cavalier	strchrnul.c
56*46a6070bSAugustin Cavalier	strcspn.c
570d29def7SAugustin Cavalier	;
580d29def7SAugustin Cavalier
590d29def7SAugustin CavalierSourceHdrs $(muslSources) :
600d560e87SDavid Karoly	[ FDirName $(posixSources) musl include ]
610d29def7SAugustin Cavalier	[ FDirName $(posixSources) musl internal ]
620d29def7SAugustin Cavalier	[ FDirName $(posixSources) musl arch $(TARGET_KERNEL_ARCH_DIR) ] ;
630d29def7SAugustin Cavalier
6498e67131SIngo WeinholdKernelMergeObject kernel_lib_posix.o :
65bd185b41SIngo Weinhold	kernel_errno.cpp
66ddde98b0SAugustin Cavalier	kernel_vsprintf.cpp
67ddde98b0SAugustin Cavalier	stack_protector.cpp
68ddde98b0SAugustin Cavalier
69ddde98b0SAugustin Cavalier	# main
70e3197646SAugustin Cavalier	dirent.cpp
71fdec1a3fSIngo Weinhold	fcntl.cpp
72eb22dbd0SJérôme Duval	poll.cpp
7338f62644SIngo Weinhold	utime.c
7438f62644SIngo Weinhold	# locale
75d338200eSTrung Nguyen	ctype_loc.cpp
76d338200eSTrung Nguyen	ctype_l.cpp
77a3f66598SOliver Tappe	ctype.cpp
78a3f66598SOliver Tappe	localeconv.cpp
79a3f66598SOliver Tappe	LocaleData.cpp
8038f62644SIngo Weinhold	# stdlib
8138f62644SIngo Weinhold	abs.c
8238f62644SIngo Weinhold	atoi.c
8338f62644SIngo Weinhold	bsearch.c
8438f62644SIngo Weinhold	merge.c
8538f62644SIngo Weinhold	qsort.c
8638f62644SIngo Weinhold	random.c
871822f5ecSIngo Weinhold	strtod.c
8838f62644SIngo Weinhold	strtol.c
8938f62644SIngo Weinhold	strtoll.c
9038f62644SIngo Weinhold	strtoul.c
9138f62644SIngo Weinhold	strtoull.c
9238f62644SIngo Weinhold	# sys
9338f62644SIngo Weinhold	chmod.c
9438f62644SIngo Weinhold	stat.c
9538f62644SIngo Weinhold	mkdir.c
96eb22dbd0SJérôme Duval	select.cpp
9738f62644SIngo Weinhold	gettimeofday.c
9838f62644SIngo Weinhold	uio.c
9938f62644SIngo Weinhold	# time
10038f62644SIngo Weinhold	time.c
10138f62644SIngo Weinhold	# unistd
10238f62644SIngo Weinhold	access.c
10338f62644SIngo Weinhold	chown.c
10438f62644SIngo Weinhold	close.c
10515ebab76SFrançois Revol	#conf.c
10638f62644SIngo Weinhold	directory.c
10738f62644SIngo Weinhold	dup.c
10838f62644SIngo Weinhold	ioctl.c
10938f62644SIngo Weinhold	link.c
11038f62644SIngo Weinhold	lseek.c
11138f62644SIngo Weinhold	mount.c
11238f62644SIngo Weinhold	read.c
11338f62644SIngo Weinhold	sync.c
11438f62644SIngo Weinhold	truncate.c
1154eb35609SIngo Weinhold	usergroup.cpp
11638f62644SIngo Weinhold	write.c
11738f62644SIngo Weinhold	# string
11838f62644SIngo Weinhold	memchr.c
11938f62644SIngo Weinhold	memcmp.c
12056d38808SAdrien Destugues	memmem.c
12138f62644SIngo Weinhold	memmove.c
12238f62644SIngo Weinhold	strcasecmp.c
12338f62644SIngo Weinhold	strcasestr.c
12438f62644SIngo Weinhold	strcat.c
12538f62644SIngo Weinhold	strchr.c
12638f62644SIngo Weinhold	strcmp.c
12738f62644SIngo Weinhold	strcpy.c
1285e36a367SAdrien Destugues	strdup.cpp
12938f62644SIngo Weinhold	strerror.c
13038f62644SIngo Weinhold	strlcat.c
13138f62644SIngo Weinhold	strlcpy.c
13255cf6996SFredrik Holmqvist	strlen.cpp
13338f62644SIngo Weinhold	strncat.c
13438f62644SIngo Weinhold	strncmp.c
135e5b4a167SFredrik Holmqvist	strncpy.cpp
136ac20a24eSColin Günther	strndup.cpp
13755cf6996SFredrik Holmqvist	strnlen.cpp
13838f62644SIngo Weinhold	strpbrk.c
13938f62644SIngo Weinhold	strrchr.c
14038f62644SIngo Weinhold	strspn.c
14138f62644SIngo Weinhold	strstr.c
14238f62644SIngo Weinhold	strtok.c
143765ae3a7SJérôme Duval	strupr.c
1449ec8a1e4SAdrien Destugues	stpcpy.c
14538f62644SIngo Weinhold
1460d29def7SAugustin Cavalier	$(muslSources)
147957a1b17SIngo Weinhold	: $(TARGET_KERNEL_PIC_CCFLAGS)
14838f62644SIngo Weinhold;
149353d20c0SIngo Weinhold
1500d29def7SAugustin CavalierSEARCH on [ FGristFiles $(muslSources) ] += [ FDirName $(posixSources) musl misc ] ;
15187be02e1SAugustin CavalierSEARCH on [ FGristFiles $(muslSources) ] += [ FDirName $(posixSources) musl prng ] ;
152*46a6070bSAugustin CavalierSEARCH on [ FGristFiles $(muslSources) ] += [ FDirName $(posixSources) musl string ] ;
1530d29def7SAugustin Cavalier
154379ad6d0SIngo Weinhold# misc
155bec0386dSAxel Dörfler
1561e860e07SAugustin CavalierSEARCH_SOURCE =
1571e860e07SAugustin Cavalier	[ FDirName $(HAIKU_TOP) src kits support ]
1581e860e07SAugustin Cavalier	[ FDirName $(HAIKU_TOP) src kits shared ]
1591e860e07SAugustin Cavalier	;
160bec0386dSAxel Dörfler
161bec0386dSAxel DörflerKernelMergeObject kernel_misc.o :
16232832cbeSIngo Weinhold	DataIO.cpp
163bec0386dSAxel Dörfler	Referenceable.cpp
1641e860e07SAugustin Cavalier	WeakReferenceable.cpp
165bec0386dSAxel Dörfler
166bec0386dSAxel Dörfler	: $(TARGET_KERNEL_PIC_CCFLAGS)
167bec0386dSAxel Dörfler;
168379ad6d0SIngo Weinhold
169379ad6d0SIngo WeinholdHaikuSubInclude arch $(TARGET_ARCH) ;
17025a7b01dSIngo WeinholdHaikuSubInclude zlib ;
1716ac3a280SJérôme Duvalif [ FIsBuildFeatureEnabled zstd ] {
1726ac3a280SJérôme Duval	HaikuSubInclude zstd ;
1736ac3a280SJérôme Duval}
174