+object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
+include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
+endif
+
+ifneq (,$(filter .os,$(object-suffixes-$(lib))))
+$(objpfx)$(patsubst %,$(libtype.os),$(lib:lib%=%)): \
+ $(patsubst %,$(objpfx)%.os,\
+ $(filter-out $($(lib)-static-only-routines),\
+ $(all-$(lib)-routines)))
+ $(build-extra-lib)
+endif
+
+ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
+$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
+ $(patsubst %,$(objpfx)%.oS,\
+ $(filter $($(lib)-static-only-routines),\
+ $(all-$(lib)-routines)))
+ $(build-extra-lib)
+endif
+
+ifeq ($(build-shared),yes)
+# Add the version script to the dependencies of the shared library.
+$(objpfx)$(lib).so: $(firstword $($(lib)-map) \
+ $(addprefix $(common-objpfx), \
+ $(filter $(lib).map, \
+ $(version-maps))))
+endif
+
+endif
+
+# This will define `libof-ROUTINE := LIB' for each of the routines.
+cpp-srcs-left := $($(lib)-routines) $($(lib)-sysdep_routines)
+ifneq (,$(cpp-srcs-left))
+include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
+endif