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