diff --git a/build.mk b/build.mk index ee01de7d..5ff713e0 100644 --- a/build.mk +++ b/build.mk @@ -144,10 +144,10 @@ TESTS= \ all: libuv.a -run-tests$(E): test/run-tests.o test/runner.o $(RUNNER_SRC) $(TESTS) libuv.$(SOEXT) +run-tests$(E): test/run-tests.o test/runner.o $(RUNNER_SRC) $(TESTS) libuv.a $(CC) $(CPPFLAGS) $(RUNNER_CFLAGS) -o $@ $^ $(RUNNER_LIBS) $(RUNNER_LDFLAGS) -run-benchmarks$(E): test/run-benchmarks.o test/runner.o $(RUNNER_SRC) $(BENCHMARKS) libuv.$(SOEXT) +run-benchmarks$(E): test/run-benchmarks.o test/runner.o $(RUNNER_SRC) $(BENCHMARKS) libuv.a $(CC) $(CPPFLAGS) $(RUNNER_CFLAGS) -o $@ $^ $(RUNNER_LIBS) $(RUNNER_LDFLAGS) test/echo.o: test/echo.c test/echo.h diff --git a/config-unix.mk b/config-unix.mk index 90798760..10e8b6cb 100644 --- a/config-unix.mk +++ b/config-unix.mk @@ -29,7 +29,7 @@ CPPFLAGS += -D_FILE_OFFSET_BITS=64 RUNNER_SRC=test/runner-unix.c RUNNER_CFLAGS=$(CFLAGS) -I$(SRCDIR)/test -RUNNER_LDFLAGS=-L"$(CURDIR)" -luv -Xlinker -rpath -Xlinker "$(CURDIR)" +RUNNER_LDFLAGS=-L"$(CURDIR)" -luv HAVE_DTRACE= DTRACE_OBJS= @@ -64,7 +64,6 @@ HAVE_DTRACE=1 CPPFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500 LDFLAGS+=-lkstat -lnsl -lsendfile -lsocket # Library dependencies are not transitive. -RUNNER_LDFLAGS += $(LDFLAGS) OBJS += src/unix/sunos.o OBJS += src/unix/dtrace.o DTRACE_OBJS += src/unix/core.o @@ -87,8 +86,7 @@ endif CPPFLAGS += -D_DARWIN_USE_64_BIT_INODE=1 LDFLAGS += -framework Foundation \ -framework CoreServices \ - -framework ApplicationServices \ - -dynamiclib -install_name "@rpath/libuv.dylib" + -framework ApplicationServices SOEXT = dylib OBJS += src/unix/darwin.o OBJS += src/unix/kqueue.o @@ -156,6 +154,8 @@ ifneq (darwin,$(PLATFORM)) LDFLAGS += -Wl,-soname,libuv.so.0.10 endif +RUNNER_LDFLAGS += $(LDFLAGS) + libuv.a: $(OBJS) $(AR) rcs $@ $^