Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fix MinGW build

Allow `make all` work under MinGW. Remove references to eio for MinGW.

Fixes #170
Fixes #171
  • Loading branch information...
luislavena authored and ry committed Sep 1, 2011
1 parent b89f4f3 commit 30ca028196af2c4486a225d04e6c87da03233216
Showing with 4 additions and 10 deletions.
  1. +1 −1 Makefile
  2. +3 −9 config-mingw.mk
@@ -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
@@ -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

0 comments on commit 30ca028

Please sign in to comment.
You can’t perform that action at this time.