aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2019-03-29 16:15:08 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2019-03-29 16:15:08 +1100
commitc5d45188f92344759fbd70275483576c0ce42d82 (patch)
treea403cb7cf7ea6c7ec4e77dfb76b454556e157d97 /Makefile
parent6ef8fcd05b740cbedf11d980e0a9ec0c87969448 (diff)
downloaddtc-c5d45188f92344759fbd70275483576c0ce42d82.zip
dtc-c5d45188f92344759fbd70275483576c0ce42d82.tar.gz
dtc-c5d45188f92344759fbd70275483576c0ce42d82.tar.bz2
Clean up LDLIBS handling
We currently set LDLIBS to include libyaml globally if we're using it. However only dtc itself actually needs to link with libyaml - the other tool binaries don't. Avoid that unnecessary inclusion by making LDLIBS handling per-target. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 07d618b..ff2b4d1 100644
--- a/Makefile
+++ b/Makefile
@@ -51,7 +51,7 @@ NO_YAML := $(shell $(PKG_CONFIG) --exists yaml-0.1; echo $$?)
ifeq ($(NO_YAML),1)
CFLAGS += -DNO_YAML
else
- LDLIBS += $(shell $(PKG_CONFIG) --libs yaml-0.1)
+ LDLIBS_dtc += $(shell $(PKG_CONFIG) --libs yaml-0.1)
endif
ifeq ($(HOSTOS),darwin)
@@ -330,7 +330,7 @@ clean: libfdt_clean pylibfdt_clean tests_clean
#
%: %.o
@$(VECHO) LD $@
- $(LINK.c) -o $@ $^ $(LDLIBS)
+ $(LINK.c) -o $@ $^ $(LDLIBS_$*)
%.o: %.c
@$(VECHO) CC $@