aboutsummaryrefslogtreecommitdiff
path: root/Rules
diff options
context:
space:
mode:
Diffstat (limited to 'Rules')
-rw-r--r--Rules21
1 files changed, 15 insertions, 6 deletions
diff --git a/Rules b/Rules
index ca1361b..cd82a6e 100644
--- a/Rules
+++ b/Rules
@@ -59,12 +59,6 @@ ifneq "$(findstring env,$(origin common-generated))" ""
common-generated :=
endif
-ifeq "$(strip $(headers))" ""
-ifneq "$(wildcard $(subdir).h)" ""
-override headers := $(subdir).h
-endif
-endif
-
include ../Makerules
.PHONY: subdir_lib
@@ -173,3 +167,18 @@ $(static-only-routines:%=$(objpfx)%.os): %.os: $(common-objpfx)empty.os
$(common-objpfx)empty.os: $(common-objpfx)empty.c $(before-compile)
$(compile-command.c)
endif
+
+ifdef shared-only-routines
+# If we have versioned code we don't need the old versions in any of the
+# static libraries.
+define o-iterator-doit
+$(shared-only-routines:%=$(objpfx)%.$o): %.$o: $(common-objpfx)empty.$o
+ rm -f $$@
+ ln $$< $$@
+
+$(common-objpfx)empty.$o: $(common-objpfx)empty.c $(before-compile)
+ $$(compile-command.c)
+endef
+object-suffixes-left := $(filter-out .os,$(object-suffixes))
+include $(o-iterator)
+endif