1SubDir HAIKU_TOP src system libroot ; 2 3UsePrivateHeaders libroot runtime_loader ; 4 5local architectureObject ; 6for architectureObject in [ MultiArchSubDirSetup ] { 7 on $(architectureObject) { 8 local architecture = $(TARGET_PACKAGING_ARCH) ; 9 10 UsePrivateSystemHeaders ; 11 12 UnarchiveObjects $(HAIKU_GCC_LIBGCC_OBJECTS_$(architecture)) 13 : $(HAIKU_GCC_LIBGCC_$(architecture)) ; 14 # we need to link against libgcc.a objects and make 15 # it available to other applications as in BeOS 16 17 local librootObjects = 18 os_main.o 19 os_arch_$(TARGET_ARCH).o 20 21 posix_arch_$(TARGET_ARCH).o 22 posix_crypt.o 23 posix_locale.o 24 posix_main.o 25 posix_pthread.o 26 posix_signal.o 27 posix_stdio.o 28 posix_gnu_arch_$(TARGET_ARCH).o 29 posix_gnu_ctype.o 30 posix_gnu_ext.o 31 posix_gnu_iconv.o 32 posix_gnu_libio.o 33 posix_gnu_locale.o 34 posix_gnu_misc.o 35 posix_gnu_regex.o 36 posix_gnu_stdio.o 37 posix_gnu_stdlib.o 38 posix_gnu_string.o 39 posix_gnu_wcsmbs.o 40 posix_stdlib.o 41 posix_string.o 42 posix_string_arch_$(TARGET_ARCH).o 43 posix_sys.o 44 posix_time.o 45 posix_unistd.o 46 posix_wchar.o 47 ; 48 librootObjects = $(librootObjects:G=$(architecture)) ; 49 50 local librootDebugObjects = 51 posix_malloc_debug.o 52 ; 53 librootDebugObjects = $(librootDebugObjects:G=$(architecture)) ; 54 55 local librootNoDebugObjects = 56 posix_malloc.o 57 ; 58 librootNoDebugObjects = $(librootNoDebugObjects:G=$(architecture)) ; 59 60 local libroot = [ MultiArchDefaultGristFiles libroot.so ] ; 61 local librootDebug = $(libroot:B=libroot_debug) ; 62 63 DONT_LINK_AGAINST_LIBROOT on $(libroot) = true ; 64 DONT_LINK_AGAINST_LIBROOT on $(librootDebug) = true ; 65 66 SetVersionScript $(libroot) : libroot_versions ; 67 SetVersionScript $(librootDebug) : libroot_versions ; 68 69 SharedLibrary $(libroot) 70 : 71 libroot_init.c 72 : 73 $(HAIKU_GCC_LIBGCC_OBJECTS_$(architecture)) 74 $(librootObjects) 75 $(librootNoDebugObjects) 76 $(HAIKU_STATIC_LIBSUPC++_$(architecture)) 77 ; 78 79 # Use the standard libroot.so soname, so when the debug version is 80 # pre-loaded it prevents the standard version to be loaded as well. 81 HAIKU_SONAME on $(librootDebug) = libroot.so ; 82 83 SharedLibrary $(librootDebug) 84 : 85 libroot_init.c 86 : 87 $(HAIKU_GCC_LIBGCC_OBJECTS_$(architecture)) 88 $(librootObjects) 89 $(librootDebugObjects) 90 $(HAIKU_STATIC_LIBSUPC++_$(architecture)) 91 ; 92 93 94 # Copy libroot.so and update the copy's revision section. We link 95 # everything against the original, but the copy will end up on the disk 96 # image (this way we avoid unnecessary dependencies). The copy will be 97 # located in a subdirectory. 98 if $(TARGET_PLATFORM) = haiku { 99 local targetDir = [ FDirName $(TARGET_DEBUG_$(DEBUG)_LOCATE_TARGET) 100 revisioned ] ; 101 local revisionedLibroot = [ MultiArchDefaultGristFiles 102 libroot.so : revisioned ] ; 103 local revisionedLibrootDebug 104 = $(librootDebug:G=$(revisionedLibroot:G)) ; 105 106 MakeLocate $(revisionedLibroot) : $(targetDir) ; 107 CopySetHaikuRevision $(revisionedLibroot) : $(libroot) ; 108 109 MakeLocate $(revisionedLibrootDebug) : $(targetDir) ; 110 CopySetHaikuRevision $(revisionedLibrootDebug) : $(librootDebug) ; 111 } 112 } 113} 114 115SubInclude HAIKU_TOP src system libroot add-ons ; 116SubInclude HAIKU_TOP src system libroot os ; 117SubInclude HAIKU_TOP src system libroot posix ; 118