From 618cded4d02129f6a480f250f82930a7c95ddc66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se> Date: Fri, 1 Nov 2002 11:19:10 +0100 Subject: [PATCH] * examples/Makefile.am (LDADD): Use -lnettle, instead of an explicit filename libnettle.a, so that we will use the shared library, if it exists. (AM_LDFLAGS): Added -L.., so we can find -lnettle. (run-tests): Set LD_LIBRARY_PATH to ../.lib, when running the testsuite. * testsuite/Makefile.am: Similar changes. Rev: src/nettle/examples/Makefile.am:1.10 Rev: src/nettle/testsuite/Makefile.am:1.28 --- examples/Makefile.am | 12 +++++++++--- testsuite/Makefile.am | 10 ++++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/examples/Makefile.am b/examples/Makefile.am index 6a228ea1..63f53769 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -1,11 +1,16 @@ CFLAGS = -I$(top_srcdir) @CFLAGS@ CPPFLAGS = @CPPFLAGS@ +# We need .. to be searched before standard places, in order to pick +# up the newly built libnettle.a/libnettle.so, rather than any +# installed version. +AM_LDFLAGS = -L.. + EXTRA_PROGRAMS = rsa-keygen rsa-sign rsa-verify noinst_PROGRAMS = nettle-benchmark sexp-conv @RSA_EXAMPLES@ -LDADD = io.o ../libnettle.a -nettle_benchmark_LDADD = ../libnettle.a +LDADD = io.o -lnettle +nettle_benchmark_LDADD = -lnettle TS_PROGS = rsa-sign-test rsa-verify-test sexp-conv-test @@ -13,6 +18,7 @@ EXTRA_DIST = io.c io.h run-tests setup-env teardown-env $(TS_PROGS) .PHONY: run-tests run-tests: $(TS_PROGS) - srcdir="$(srcdir)" "$(srcdir)"/run-tests $(TS_PROGS) + LD_LIBRARY_PATH=../.lib srcdir="$(srcdir)" \ + "$(srcdir)"/run-tests $(TS_PROGS) check: run-tests diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index 51b505dd..46d7d6ee 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -1,6 +1,11 @@ CFLAGS = -I$(top_srcdir) @CFLAGS@ CPPFLAGS = @CPPFLAGS@ +# We need .. to be searched before standard places, in order to pick +# up the newly built libnettle.a/libnettle.so, rather than any +# installed version. +AM_LDFLAGS = -L.. + TS_PROGS = aes-test arcfour-test blowfish-test cast128-test \ base16-test base64-test \ des-test des3-test des-compat-test \ @@ -16,12 +21,13 @@ TS_PROGS = aes-test arcfour-test blowfish-test cast128-test \ noinst_PROGRAMS = $(TS_PROGS) -LDADD = testutils.o ../libnettle.a +LDADD = testutils.o -lnettle EXTRA_DIST = testutils.c testutils.h \ run-tests rfc1750.txt .PHONY: run-tests run-tests: $(TS_PROGS) - srcdir="$(srcdir)" "$(srcdir)"/run-tests $(TS_PROGS) + LD_LIBRARY_PATH=../.lib srcdir="$(srcdir)" \ + "$(srcdir)"/run-tests $(TS_PROGS) check: run-tests -- GitLab