$($(lib)-shared-only-routines),\
$(all-$(lib)-routines))))
ifneq (,$(filter .os,$(object-suffixes-$(lib))))
-extra-objs += $(all-$(lib)-routines:%=%.os)
+extra-objs += $(patsubst %,%.os,$(filter-out $($(lib)-static-only-routines),\
+ $(all-$(lib)-routines)))
+endif
+ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
+extra-objs += $(patsubst %,%.oS,$(filter $($(lib)-static-only-routines),\
+ $(all-$(lib)-routines)))
endif
alltypes-$(lib) := $(foreach o,$(object-suffixes-$(lib)),\
$(objpfx)$(patsubst %,$(libtype$o),\
$(build-extra-lib)
endif
-ifeq ($(versioning),yes)
+ifeq ($(build-shared),yes)
# Add the version script to the dependencies of the shared library.
$(objpfx)$(lib).so: $(firstword $($(lib)-map) \
$(addprefix $(common-objpfx), \
ifneq (,$(cpp-srcs-left))
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
endif
-
-CPPFLAGS-$(lib) := -DNOT_IN_libc=1 -DIS_IN_$(lib)=1