xref: /haiku/src/system/runtime_loader/Jamfile (revision 1e314683024c28e778a59dd5f7ef27b8d1d9df92)
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	<src!system!libroot!os!arch!$(TARGET_ARCH)!$(architecture)>tls.o
34
35	<src!system!libroot!posix!$(architecture)>errno.o
36  	<src!system!libroot!posix!$(architecture)>fcntl.o
37
38	<src!system!libroot!posix!locale!$(architecture)>ctype.o
39	<src!system!libroot!posix!locale!$(architecture)>LocaleData.o
40
41	<src!system!libroot!posix!string!$(architecture)>memchr.o
42	<src!system!libroot!posix!string!$(architecture)>memcmp.o
43	<src!system!libroot!posix!string!$(architecture)>memmove.o
44	<src!system!libroot!posix!string!$(architecture)>strcasecmp.o
45	<src!system!libroot!posix!string!$(architecture)>strcat.o
46	<src!system!libroot!posix!string!$(architecture)>strchr.o
47	<src!system!libroot!posix!string!$(architecture)>strcmp.o
48	<src!system!libroot!posix!string!$(architecture)>strcpy.o
49	<src!system!libroot!posix!string!$(architecture)>strcspn.o
50	<src!system!libroot!posix!string!$(architecture)>strdup.o
51	<src!system!libroot!posix!string!$(architecture)>strerror.o
52	<src!system!libroot!posix!string!$(architecture)>strlcat.o
53	<src!system!libroot!posix!string!$(architecture)>strlcpy.o
54	<src!system!kernel!lib>strlen.o
55	<src!system!libroot!posix!string!$(architecture)>strncmp.o
56	<src!system!libroot!posix!string!$(architecture)>strnlen.o
57	<src!system!libroot!posix!string!$(architecture)>strpbrk.o
58	<src!system!libroot!posix!string!$(architecture)>strrchr.o
59	<src!system!libroot!posix!string!$(architecture)>strspn.o
60	<src!system!libroot!posix!string!$(architecture)>strstr.o
61
62	[ FGristFiles kernel_vsprintf.o ]
63;
64
65SEARCH on [ FGristFiles kernel_cpp.cpp ]
66	= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
67SEARCH on [ FGristFiles kernel_vsprintf.cpp ]
68	= [ FDirName $(HAIKU_TOP) src system kernel lib ] ;
69SEARCH on [ FGristFiles KMessage.cpp ]
70	= [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
71
72
73local sources =
74	add_ons.cpp
75	elf.cpp
76	elf_haiku_version.cpp
77	elf_load_image.cpp
78	elf_symbol_lookup.cpp
79	elf_tls.cpp
80	elf_versioning.cpp
81	pe.cpp
82	errors.cpp
83	export.cpp
84	heap.cpp
85	images.cpp
86	runtime_loader.cpp
87	utility.cpp
88;
89
90Objects $(sources) ;
91
92Ld runtime_loader :
93	[ FGristFiles $(sources:S=$(SUFOBJ)) ]
94	libruntime_loader.a
95	libruntime_loader_$(TARGET_ARCH).a
96	$(HAIKU_STATIC_LIBSUPC++_$(TARGET_PACKAGING_ARCH))
97	$(HAIKU_GCC_LIBGCC_$(TARGET_PACKAGING_ARCH))
98	: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/runtime_loader.ld
99	: --no-undefined -shared -soname=runtime_loader
100;
101
102HaikuSubInclude arch $(TARGET_ARCH) ;
103