Fix the makefile for mingw32
This commit is contained in:
parent
4dd0a9cd73
commit
0144ab9ca7
10
Makefile
10
Makefile
@ -18,7 +18,7 @@
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
name_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
|
||||
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
|
||||
|
||||
ifneq (,$(findstring MINGW,$(uname_S)))
|
||||
include config-mingw.mk
|
||||
@ -30,11 +30,11 @@ all: oio.a test/run-tests test/run-benchmarks
|
||||
|
||||
test/run-tests$(E): test/*.h test/run-tests.c $(RUNNER_SRC) test/runner-unix.c $(TESTS) oio.a
|
||||
$(CC) $(RUNNER_CFLAGS) $(RUNNER_LINKFLAGS) -o test/run-tests test/run-tests.c \
|
||||
test/runner.c $(RUNNER_SRC) $(TESTS) oio.a
|
||||
test/runner.c $(RUNNER_SRC) $(TESTS) oio.a $(RUNNER_LIBS)
|
||||
|
||||
test/run-benchmarks$(E): test/*.h test/run-benchmarks.c test/runner.c $(RUNNER_SRC) $(BENCHMARKS) oio.a
|
||||
$(CC) $(RUNNER_CFLAGS) $(RUNNER_LINKFLAGS) -o test/run-benchmarks test/run-benchmarks.c \
|
||||
test/runner.c $(RUNNER_SRC) $(BENCHMARKS) oio.a
|
||||
test/runner.c $(RUNNER_SRC) $(BENCHMARKS) oio.a $(RUNNER_LIBS)
|
||||
|
||||
test/echo.o: test/echo.c test/echo.h
|
||||
$(CC) $(CFLAGS) -c test/echo.c -o test/echo.o
|
||||
@ -43,10 +43,10 @@ test/echo.o: test/echo.c test/echo.h
|
||||
.PHONY: clean clean-platform distclean distclean-platform test benchmark
|
||||
|
||||
|
||||
test: test/run-tests
|
||||
test: test/run-tests$(E)
|
||||
test/run-tests
|
||||
|
||||
bench: test/run-benchmarks
|
||||
bench: test/run-benchmarks$(E)
|
||||
test/run-benchmarks
|
||||
|
||||
clean: clean-platform
|
||||
|
||||
@ -30,7 +30,8 @@ TESTS=test/echo-server.c test/test-*.c
|
||||
BENCHMARKS=test/echo-server.c test/benchmark-*.c
|
||||
|
||||
RUNNER_CFLAGS=$(CFLAGS) -D_GNU_SOURCE # Need _GNU_SOURCE for strdup?
|
||||
RUNNER_LINKFLAGS=$(LINKFLAGS) -lws2_32
|
||||
RUNNER_LINKFLAGS=$(LINKFLAGS)
|
||||
RUNNER_LIBS=-lws2_32
|
||||
RUNNER_SRC=test/runner-win.c
|
||||
|
||||
oio.a: oio-win.o
|
||||
@ -41,4 +42,3 @@ oio-win.o: oio-win.c oio.h oio-win.h
|
||||
|
||||
distclean-platform:
|
||||
clean-platform:
|
||||
;
|
||||
|
||||
@ -28,6 +28,7 @@ BENCHMARKS=test/echo-server.c test/benchmark-*.c
|
||||
|
||||
RUNNER_CFLAGS=$(CFLAGS) -D_GNU_SOURCE # Need _GNU_SOURCE for strdup?
|
||||
RUNNER_LINKFLAGS=$(LINKFLAGS) -pthread
|
||||
RUNNER_LIBS=
|
||||
RUNNER_SRC=test/runner-unix.c
|
||||
|
||||
oio.a: oio-unix.o ev/ev.o
|
||||
|
||||
Loading…
Reference in New Issue
Block a user