]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
* examples/Makefile.am (LDADD): Use -lnettle, instead of an
authorNiels Möller <nisse@lysator.liu.se>
Fri, 1 Nov 2002 10:19:10 +0000 (11:19 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Fri, 1 Nov 2002 10:19:10 +0000 (11:19 +0100)
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
testsuite/Makefile.am

index 6a228ea1873c40cf4f2b96b2b51fdcec5a0ce0dd..63f53769b374aea9705041b04951bbfb02c3b776 100644 (file)
@@ -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
index 51b505dd5b81f170a723534e8d14076810ae31fa..46d7d6ee8dc690ca36e873fe3c0aa91a4b818bfe 100644 (file)
@@ -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