summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile15
-rw-r--r--package/targets.mak14
2 files changed, 16 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index c7b57a6..29a1875 100644
--- a/Makefile
+++ b/Makefile
@@ -18,9 +18,24 @@ STATIC_LIBS :=
SHARED_LIBS :=
INTERNAL_LIBS :=
EXTRA_TARGETS :=
+LIB_DEFS :=
-include config.mak
+
+define library_definition =
+LIB$(firstword $(subst =, ,$(1))) := lib$(lastword $(subst =, ,$(1))).$(if $(DO_ALLSTATIC),a,so).xyzzy
+ifdef DO_SHARED
+SHARED_LIBS += lib$(lastword $(subst =, ,$(1))).so.xyzzy
+endif
+ifdef DO_STATIC
+STATIC_LIBS += lib$(lastword $(subst =, ,$(1))).a.xyzzy
+endif
+endef
+
include package/targets.mak
+
+$(foreach var,$(LIB_DEFS),$(eval $(call library_definition,$(var))))
+
include package/deps.mak
version_m := $(basename $(version))
diff --git a/package/targets.mak b/package/targets.mak
index e2b36cf..b26ed04 100644
--- a/package/targets.mak
+++ b/package/targets.mak
@@ -47,16 +47,4 @@ wait
SBIN_TARGETS :=
LIBEXEC_TARGETS :=
-ifdef DO_ALLSTATIC
-LIBEXECLINE := libexecline.a.xyzzy
-else
-LIBEXECLINE := libexecline.so.xyzzy
-endif
-
-ifdef DO_SHARED
-SHARED_LIBS := libexecline.so.xyzzy
-endif
-
-ifdef DO_STATIC
-STATIC_LIBS := libexecline.a.xyzzy
-endif
+LIB_DEFS := EXECLINE=execline