SubDir HAIKU_TOP src system runtime_loader arch x86 ;

local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup x86 x86_gcc2 ] {
	on $(architectureObject) {
		local architecture = $(TARGET_PACKAGING_ARCH) ;

		UsePrivateHeaders runtime_loader ;
		UsePrivateSystemHeaders ;

		SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;

		StaticLibrary <$(architecture)>libruntime_loader_$(TARGET_ARCH).a :
			arch_relocate.cpp
			:
			<src!system!libroot!os!arch!$(TARGET_ARCH)!$(architecture)>atomic.o
			<src!system!libroot!os!arch!$(TARGET_ARCH)!$(architecture)>thread.o

			[ MultiArchIfPrimary
				<src!system!libroot!posix!string!arch!$(TARGET_ARCH)!$(architecture)>memcpy.o
				<src!system!libroot!posix!string!arch!$(TARGET_ARCH)!$(architecture)>memset.o
				:
				<src!system!libroot!posix!string!arch!$(TARGET_ARCH)!$(architecture)>arch_string.o
				: x86_64 ]
			;
	}
}