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