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 ObjectC++Flags kernel_cpp.cpp : -fno-builtin ; 23 24 SubDirC++Flags -fno-exceptions ; 25 26 DEFINES += 27 KMESSAGE_CONTAINER_ONLY 28 _LOADER_MODE 29 USING_LIBGCC=1 30 ; 31 32 AddResources [ MultiArchDefaultGristFiles runtime_loader ] 33 : runtime_loader.rdef ; 34 35 # needed for "runtime_loader" only 36 StaticLibrary <$(architecture)>libruntime_loader.a : 37 kernel_vsprintf.cpp 38 kernel_cpp.cpp 39 KMessage.cpp 40 find_directory.cpp 41 : 42 <src!system!libroot!os!$(architecture)>mutex.o 43 <src!system!libroot!os!$(architecture)>recursive_lock.o 44 <src!system!libroot!os!$(architecture)>syscalls.o 45 <src!system!libroot!os!$(architecture)>sem.o 46 <src!system!libroot!os!arch!$(TARGET_ARCH)!$(architecture)>tls.o 47 48 <src!system!libroot!posix!$(architecture)>errno.o 49 <src!system!libroot!posix!$(architecture)>fcntl.o 50 51 <src!system!libroot!posix!locale!$(architecture)>ctype.o 52 <src!system!libroot!posix!locale!$(architecture)>ctype_loc.o 53 <src!system!libroot!posix!locale!$(architecture)>LocaleData.o 54 55 <src!system!libroot!posix!musl!string!$(architecture)>strchrnul.o 56 <src!system!libroot!posix!musl!string!$(architecture)>strcspn.o 57 58 <src!system!libroot!posix!string!$(architecture)>memchr.o 59 <src!system!libroot!posix!string!$(architecture)>memcmp.o 60 <src!system!libroot!posix!string!$(architecture)>memmove.o 61 <src!system!libroot!posix!string!$(architecture)>strcasecmp.o 62 <src!system!libroot!posix!string!$(architecture)>strcat.o 63 <src!system!libroot!posix!string!$(architecture)>strchr.o 64 <src!system!libroot!posix!string!$(architecture)>strcmp.o 65 <src!system!libroot!posix!string!$(architecture)>strcpy.o 66 <src!system!libroot!posix!string!$(architecture)>strdup.o 67 <src!system!libroot!posix!string!$(architecture)>strerror.o 68 <src!system!libroot!posix!string!$(architecture)>strlcat.o 69 <src!system!libroot!posix!string!$(architecture)>strlcpy.o 70 <src!system!libroot!posix!string!$(architecture)>strlen.o 71 <src!system!libroot!posix!string!$(architecture)>strncmp.o 72 <src!system!libroot!posix!string!$(architecture)>strnlen.o 73 <src!system!libroot!posix!string!$(architecture)>strpbrk.o 74 <src!system!libroot!posix!string!$(architecture)>strrchr.o 75 <src!system!libroot!posix!string!$(architecture)>strspn.o 76 <src!system!libroot!posix!string!$(architecture)>strstr.o 77 ; 78 79 SEARCH on [ FGristFiles kernel_cpp.cpp ] 80 = [ FDirName $(HAIKU_TOP) src system kernel util ] ; 81 SEARCH on [ FGristFiles kernel_vsprintf.cpp ] 82 = [ FDirName $(HAIKU_TOP) src system kernel lib ] ; 83 SEARCH on [ FGristFiles KMessage.cpp ] 84 = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ; 85 SEARCH on [ FGristFiles find_directory.cpp ] 86 = [ FDirName $(HAIKU_TOP) src system libroot os ] ; 87 88 local sources = 89 add_ons.cpp 90 elf.cpp 91 elf_haiku_version.cpp 92 elf_load_image.cpp 93 elf_symbol_lookup.cpp 94 elf_tls.cpp 95 elf_versioning.cpp 96 pe.cpp 97 errors.cpp 98 export.cpp 99 heap.cpp 100 images.cpp 101 runtime_loader.cpp 102 utility.cpp 103 ; 104 105 Objects [ FGristFiles $(sources) ] ; 106 107 Ld [ MultiArchDefaultGristFiles runtime_loader ] : 108 [ FGristFiles $(sources:S=$(SUFOBJ)) ] 109 <$(architecture)>libruntime_loader.a 110 <$(architecture)>libruntime_loader_$(TARGET_ARCH).a 111 [ TargetKernelLibsupc++ ] 112 [ TargetKernelLibgcc ] 113 [ TargetKernelLibgcceh ] 114 : 115 : --no-undefined -shared -Bsymbolic -soname=runtime_loader -entry=runtime_loader 116 ; 117 } 118} 119 120 121local arch ; 122for arch in $(TARGET_ARCHS) { 123 HaikuSubInclude arch $(arch) ; 124} 125 126