From 20eaa84c4fe94525cbc9bca06ad0cf71d2854ad9 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 9 Nov 2012 02:15:17 +0100 Subject: [PATCH] build: link test runner with -rpath Link the test runner with -rpath=/path/to/libuv.so, don't muck around with LD_LIBRARY_PATH. --- Makefile | 10 ++-------- config-unix.mk | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index b0716f99..1aa508e7 100644 --- a/Makefile +++ b/Makefile @@ -50,16 +50,10 @@ test/echo.o: test/echo.c test/echo.h test: test/run-tests$(E) - LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):." test/run-tests - -#test-%: test/run-tests$(E) -# test/run-tests $(@:test-%=%) + $< bench: test/run-benchmarks$(E) - test/run-benchmarks - -#bench-%: test/run-benchmarks$(E) -# test/run-benchmarks $(@:bench-%=%) + $< clean: clean-platform $(RM) -f src/*.o *.a test/run-tests$(E) test/run-benchmarks$(E) diff --git a/config-unix.mk b/config-unix.mk index 39d7923e..db4b0a99 100644 --- a/config-unix.mk +++ b/config-unix.mk @@ -121,7 +121,7 @@ endif # Need _GNU_SOURCE for strdup? RUNNER_CFLAGS=$(CFLAGS) -D_GNU_SOURCE -Itest -RUNNER_LINKFLAGS=$(LINKFLAGS) -L"$(PWD)" -luv +RUNNER_LINKFLAGS=$(LINKFLAGS) -Wl,-rpath="$(PWD)" -L"$(PWD)" -luv ifeq (SunOS,$(uname_S)) RUNNER_LINKFLAGS += -pthreads