diff options
author | kevans@FreeBSD.org <kevans@FreeBSD.org> | 2018-01-03 22:30:13 -0600 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2018-01-04 15:36:44 +1100 |
commit | 51b3a16338df06cc5fba94c21e1184698ca4afd4 (patch) | |
tree | 956495ec0823a5261728c97893c83f14684d1897 | |
parent | 333d533a8f4dd38f5d8ae6489f675cc02dd6ee5e (diff) | |
download | device-tree-compiler-51b3a16338df06cc5fba94c21e1184698ca4afd4.tar.gz |
Makefile.tests: Add LIBDL make(1) variable for portability sake
Some platforms (many, if not all, of the *BSD projects) do not provide a libdl,
and instead provide the same functionality in libc. Instead of forcing these
platforms to patch out the link against libdl, add a LIBDL make(1) variable to
allow the -ldl argument to be excluded easily via make(1) arguments.
Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r-- | tests/Makefile.tests | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/Makefile.tests b/tests/Makefile.tests index 2258135..262944a 100644 --- a/tests/Makefile.tests +++ b/tests/Makefile.tests @@ -54,9 +54,12 @@ tests: $(TESTS) $(TESTS_TREES) $(LIB_TESTS): %: $(TESTS_PREFIX)testutils.o util.o $(LIBFDT_archive) +# Not necessary on all platforms; allow -ldl to be excluded instead of forcing +# other platforms to patch it out. +LIBDL = -ldl $(DL_LIB_TESTS): %: %.o $(TESTS_PREFIX)testutils.o util.o $(LIBFDT_archive) @$(VECHO) LD [libdl] $@ - $(LINK.c) -o $@ $^ -ldl + $(LINK.c) -o $@ $^ $(LIBDL) $(LIBTREE_TESTS): %: $(TESTS_PREFIX)testutils.o $(TESTS_PREFIX)trees.o \ util.o $(LIBFDT_archive) |