From 30ca028196af2c4486a225d04e6c87da03233216 Mon Sep 17 00:00:00 2001 From: Luis Lavena Date: Thu, 1 Sep 2011 20:45:03 -0300 Subject: [PATCH] Fix MinGW build Allow `make all` work under MinGW. Remove references to eio for MinGW. Fixes #170 Fixes #171 --- Makefile | 2 +- config-mingw.mk | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index d125271684..59be3de08f 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,7 @@ endif TESTS=test/echo-server.c test/test-*.c BENCHMARKS=test/echo-server.c test/dns-server.c test/benchmark-*.c -all: uv.a test/run-tests test/run-benchmarks +all: uv.a test/run-tests$(E) test/run-benchmarks$(E) $(CARES_OBJS): %.o: %.c $(CC) -o $*.o -c $(CFLAGS) $(CPPFLAGS) $< -DHAVE_CONFIG_H diff --git a/config-mingw.mk b/config-mingw.mk index c7b5577f10..d4daca8a1f 100644 --- a/config-mingw.mk +++ b/config-mingw.mk @@ -36,25 +36,19 @@ RUNNER_LINKFLAGS=$(LINKFLAGS) RUNNER_LIBS=-lws2_32 RUNNER_SRC=test/runner-win.c -uv.a: $(WIN_OBJS) src/uv-common.o src/uv-eio.o src/eio/eio.o $(CARES_OBJS) - $(AR) rcs uv.a src/win/*.o src/uv-common.o src/uv-eio.o src/eio/eio.o $(CARES_OBJS) +uv.a: $(WIN_OBJS) src/uv-common.o $(CARES_OBJS) + $(AR) rcs uv.a src/win/*.o src/uv-common.o $(CARES_OBJS) src/win/%.o: src/win/%.c src/win/internal.h $(CC) $(CFLAGS) -o $@ -c $< -src/uv-common.o: src/uv-common.c include/uv.h include/uv-win.h +src/uv-common.o: src/uv-common.c include/uv.h include/uv-private/uv-win.h $(CC) $(CFLAGS) -c src/uv-common.c -o src/uv-common.o EIO_CPPFLAGS += $(CPPFLAGS) EIO_CPPFLAGS += -DEIO_STACKSIZE=65536 EIO_CPPFLAGS += -D_GNU_SOURCE -src/eio/eio.o: src/eio/eio.c - $(CC) $(EIO_CPPFLAGS) $(CFLAGS) -c src/eio/eio.c -o src/eio/eio.o - -src/uv-eio.o: src/uv-eio.c - $(CC) $(CPPFLAGS) -Isrc/eio/ $(CFLAGS) -c src/uv-eio.c -o src/uv-eio.o - clean-platform: -rm -f src/ares/*.o -rm -f src/eio/*.o