SubDir HAIKU_TOP src system runtime_loader ; if $(TARGET_ARCH) = x86_64 && ( x86 in $(HAIKU_ARCHS[2-]) || x86_gcc2 in $(HAIKU_ARCHS[2-]) ) { DEFINES += _COMPAT_MODE ; } local architectureObject ; for architectureObject in [ MultiArchSubDirSetup ] { on $(architectureObject) { local architecture = $(TARGET_PACKAGING_ARCH) ; UsePrivateHeaders libroot runtime_loader shared ; UsePrivateHeaders kernel ; # for UsePrivateHeaders libroot os ; # for "PathBuffer.h" UsePrivateSystemHeaders ; ObjectHdrs find_directory.cpp : $(HAIKU_TOP)/src/system/libroot/os ; # Don't let gcc inject built-in function code. This will cause # dependencies to libroot, which we don't link against. SubDirCcFlags -fno-builtin ; SubDirC++Flags -fno-builtin -fno-exceptions ; DEFINES += KMESSAGE_CONTAINER_ONLY _LOADER_MODE USING_LIBGCC=1 ; AddResources [ MultiArchDefaultGristFiles runtime_loader ] : runtime_loader.rdef ; # needed for "runtime_loader" only StaticLibrary <$(architecture)>libruntime_loader.a : kernel_vsprintf.cpp kernel_cpp.cpp KMessage.cpp find_directory.cpp : mutex.o recursive_lock.o syscalls.o sem.o tls.o errno.o fcntl.o ctype.o LocaleData.o memchr.o memcmp.o memmove.o strcasecmp.o strcat.o strchr.o strcmp.o strcpy.o strcspn.o strdup.o strerror.o strlcat.o strlcpy.o strlen.o strncmp.o strnlen.o strpbrk.o strrchr.o strspn.o strstr.o ; SEARCH on [ FGristFiles kernel_cpp.cpp ] = [ FDirName $(HAIKU_TOP) src system kernel util ] ; SEARCH on [ FGristFiles kernel_vsprintf.cpp ] = [ FDirName $(HAIKU_TOP) src system kernel lib ] ; SEARCH on [ FGristFiles KMessage.cpp ] = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ; SEARCH on [ FGristFiles find_directory.cpp ] = [ FDirName $(HAIKU_TOP) src system libroot os ] ; local sources = add_ons.cpp elf.cpp elf_haiku_version.cpp elf_load_image.cpp elf_symbol_lookup.cpp elf_tls.cpp elf_versioning.cpp pe.cpp errors.cpp export.cpp heap.cpp images.cpp runtime_loader.cpp utility.cpp ; Objects [ FGristFiles $(sources) ] ; Ld [ MultiArchDefaultGristFiles runtime_loader ] : [ FGristFiles $(sources:S=$(SUFOBJ)) ] <$(architecture)>libruntime_loader.a <$(architecture)>libruntime_loader_$(TARGET_ARCH).a [ TargetKernelLibsupc++ ] [ TargetKernelLibgcc ] [ TargetKernelLibgcceh ] : $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/runtime_loader.ld : --no-undefined -shared -soname=runtime_loader ; } } local arch ; for arch in $(TARGET_ARCHS) { HaikuSubInclude arch $(arch) ; }