test: make make test link against .so
This commit is contained in:
parent
cc36fd0366
commit
43d52c77ba
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,8 +1,8 @@
|
||||
*.swp
|
||||
*.o
|
||||
*.[oa]
|
||||
*.so
|
||||
*.lo
|
||||
*.la
|
||||
*.a
|
||||
*.opensdf
|
||||
*.orig
|
||||
*.sdf
|
||||
|
||||
13
Makefile
13
Makefile
@ -37,23 +37,20 @@ BENCHMARKS=test/blackhole-server.c test/echo-server.c test/dns-server.c test/ben
|
||||
|
||||
all: libuv.a
|
||||
|
||||
test/run-tests$(E): test/*.h test/run-tests.c $(RUNNER_SRC) test/runner-unix.c $(TESTS) libuv.a
|
||||
$(CC) $(CPPFLAGS) $(RUNNER_CFLAGS) -o test/run-tests test/run-tests.c \
|
||||
test/runner.c $(RUNNER_SRC) $(TESTS) libuv.a $(RUNNER_LIBS) $(RUNNER_LINKFLAGS)
|
||||
test/run-tests$(E): test/run-tests.c test/runner.c $(RUNNER_SRC) $(TESTS) libuv.so
|
||||
$(CC) $(CPPFLAGS) $(RUNNER_CFLAGS) -o $@ $^ $(RUNNER_LIBS) $(RUNNER_LINKFLAGS)
|
||||
|
||||
test/run-benchmarks$(E): test/*.h test/run-benchmarks.c test/runner.c $(RUNNER_SRC) $(BENCHMARKS) libuv.a
|
||||
$(CC) $(CPPFLAGS) $(RUNNER_CFLAGS) -o test/run-benchmarks test/run-benchmarks.c \
|
||||
test/runner.c $(RUNNER_SRC) $(BENCHMARKS) libuv.a $(RUNNER_LIBS) $(RUNNER_LINKFLAGS)
|
||||
test/run-benchmarks$(E): test/run-benchmarks.c test/runner.c $(RUNNER_SRC) $(BENCHMARKS) libuv.so
|
||||
$(CC) $(CPPFLAGS) $(RUNNER_CFLAGS) -o $@ $^ $(RUNNER_LIBS) $(RUNNER_LINKFLAGS)
|
||||
|
||||
test/echo.o: test/echo.c test/echo.h
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c test/echo.c -o test/echo.o
|
||||
|
||||
|
||||
.PHONY: clean clean-platform distclean distclean-platform test bench
|
||||
|
||||
|
||||
test: test/run-tests$(E)
|
||||
test/run-tests
|
||||
LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):." test/run-tests
|
||||
|
||||
#test-%: test/run-tests$(E)
|
||||
# test/run-tests $(@:test-%=%)
|
||||
|
||||
@ -120,8 +120,8 @@ OBJS += src/unix/cygwin.o
|
||||
endif
|
||||
|
||||
# Need _GNU_SOURCE for strdup?
|
||||
RUNNER_CFLAGS=$(CFLAGS) -D_GNU_SOURCE
|
||||
RUNNER_LINKFLAGS=$(LINKFLAGS)
|
||||
RUNNER_CFLAGS=$(CFLAGS) -D_GNU_SOURCE -Itest
|
||||
RUNNER_LINKFLAGS=$(LINKFLAGS) -L"$(PWD)" -luv
|
||||
|
||||
ifeq (SunOS,$(uname_S))
|
||||
RUNNER_LINKFLAGS += -pthreads
|
||||
|
||||
Loading…
Reference in New Issue
Block a user