xref: /haiku/src/system/runtime_loader/Jamfile (revision 04a0e9c7b68cbe3a43d38e2bca8e860fd80936fb)
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	pe.cpp
80	errors.cpp
81	export.cpp
82	heap.cpp
83	images.cpp
84	runtime_loader.cpp
85	utility.cpp
86;
87
88Objects $(sources) ;
89
90Ld runtime_loader :
91	[ FGristFiles $(sources:S=$(SUFOBJ)) ]
92	libruntime_loader.a
93	libruntime_loader_$(TARGET_ARCH).a
94	$(HAIKU_STATIC_LIBSUPC++_$(TARGET_PACKAGING_ARCH))
95	$(HAIKU_GCC_LIBGCC_$(TARGET_PACKAGING_ARCH))
96	: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/runtime_loader.ld
97	: --no-undefined -shared -soname=runtime_loader
98;
99
100HaikuSubInclude arch $(TARGET_ARCH) ;
101