aboutsummaryrefslogtreecommitdiffstats
path: root/shared.mak
diff options
context:
space:
mode:
Diffstat (limited to 'shared.mak')
-rw-r--r--shared.mak8
1 files changed, 8 insertions, 0 deletions
diff --git a/shared.mak b/shared.mak
index aeb80fc4d5..29bebd30d8 100644
--- a/shared.mak
+++ b/shared.mak
@@ -108,3 +108,11 @@ endif
define mkdir_p_parent_template
$(if $(wildcard $(@D)),,$(QUIET_MKDIR_P_PARENT)$(shell mkdir -p $(@D)))
endef
+
+## Getting sick of writing -L$(SOMELIBDIR) $(CC_LD_DYNPATH)$(SOMELIBDIR)?
+## Write $(call libpath_template,$(SOMELIBDIR)) instead, perhaps?
+## With CC_LD_DYNPATH set to either an empty string or to "-L", the
+## the directory is not shown the second time.
+define libpath_template
+-L$(1) $(if $(filter-out -L,$(CC_LD_DYNPATH)),$(CC_LD_DYNPATH)$(1))
+endef