xref: /haiku/src/system/runtime_loader/Jamfile (revision 2b76973fa2401f7a5edf68e6470f3d3210cbcff3)
1SubDir HAIKU_TOP src system runtime_loader ;
2
3local architecture = $(TARGET_PACKAGING_ARCH) ;
4
5UsePrivateHeaders libroot runtime_loader shared ;
6UsePrivateHeaders kernel ;
7	# for <util/KMessage.h>
8UsePrivateSystemHeaders ;
9
10# Don't let gcc inject built-in function code. This will cause dependencies
11# to libroot, which we don't link against.
12SubDirCcFlags -fno-builtin ;
13SubDirC++Flags -fno-builtin -fno-exceptions ;
14
15DEFINES +=
16	KMESSAGE_CONTAINER_ONLY
17	_LOADER_MODE
18	USING_LIBGCC=1
19;
20
21AddResources runtime_loader : runtime_loader.rdef ;
22
23# needed for "runtime_loader" only
24StaticLibrary libruntime_loader.a :
25	kernel_vsprintf.cpp
26	kernel_cpp.cpp
27	KMessage.cpp
28	:
29	<src!system!libroot!os!$(architecture)>mutex.o
30	<src!system!libroot!os!$(architecture)>recursive_lock.o
31	<src!system!libroot!os!$(architecture)>syscalls.o
32	<src!system!libroot!os!$(architecture)>sem.o
33
34	<src!system!libroot!posix!$(architecture)>errno.o
35  	<src!system!libroot!posix!$(architecture)>fcntl.o
36
37	<src!system!libroot!posix!locale!$(architecture)>ctype.o
38	<src!system!libroot!posix!locale!$(architecture)>LocaleData.o
39
40	<src!system!libroot!posix!string!$(architecture)>memchr.o
41	<src!system!libroot!posix!string!$(architecture)>memcmp.o
42	<src!system!libroot!posix!string!$(architecture)>memmove.o
43	<src!system!libroot!posix!string!$(architecture)>strcasecmp.o
44	<src!system!libroot!posix!string!$(architecture)>strcat.o
45	<src!system!libroot!posix!string!$(architecture)>strchr.o
46	<src!system!libroot!posix!string!$(architecture)>strcmp.o
47	<src!system!libroot!posix!string!$(architecture)>strcpy.o
48	<src!system!libroot!posix!string!$(architecture)>strcspn.o
49	<src!system!libroot!posix!string!$(architecture)>strdup.o
50	<src!system!libroot!posix!string!$(architecture)>strerror.o
51	<src!system!libroot!posix!string!$(architecture)>strlcat.o
52	<src!system!libroot!posix!string!$(architecture)>strlcpy.o
53	<src!system!kernel!lib>strlen.o
54	<src!system!libroot!posix!string!$(architecture)>strncmp.o
55	<src!system!libroot!posix!string!$(architecture)>strnlen.o
56	<src!system!libroot!posix!string!$(architecture)>strpbrk.o
57	<src!system!libroot!posix!string!$(architecture)>strrchr.o
58	<src!system!libroot!posix!string!$(architecture)>strspn.o
59	<src!system!libroot!posix!string!$(architecture)>strstr.o
60
61	[ FGristFiles kernel_vsprintf.o ]
62;
63
64SEARCH on [ FGristFiles kernel_cpp.cpp ]
65	= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
66SEARCH on [ FGristFiles kernel_vsprintf.cpp ]
67	= [ FDirName $(HAIKU_TOP) src system kernel lib ] ;
68SEARCH on [ FGristFiles KMessage.cpp ]
69	= [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
70
71
72local sources =
73	add_ons.cpp
74	elf.cpp
75	elf_haiku_version.cpp
76	elf_load_image.cpp
77	elf_symbol_lookup.cpp
78	elf_versioning.cpp
79	errors.cpp
80	export.cpp
81	heap.cpp
82	images.cpp
83	runtime_loader.cpp
84	utility.cpp
85;
86
87Objects $(sources) ;
88
89Ld runtime_loader :
90	[ FGristFiles $(sources:S=$(SUFOBJ)) ]
91	libruntime_loader.a
92	libruntime_loader_$(TARGET_ARCH).a
93	$(HAIKU_STATIC_LIBSUPC++_$(TARGET_PACKAGING_ARCH))
94	$(HAIKU_GCC_LIBGCC_$(TARGET_PACKAGING_ARCH))
95	: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/runtime_loader.ld
96	: --no-undefined -shared -soname=runtime_loader
97;
98
99HaikuSubInclude arch $(TARGET_ARCH) ;
100