Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
Fix MinGW build
Browse files Browse the repository at this point in the history
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 2, 2011
1 parent b89f4f3 commit 30ca028
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -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
Expand Down
12 changes: 3 additions & 9 deletions config-mingw.mk
Expand Up @@ -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
Expand Down

0 comments on commit 30ca028

Please sign in to comment.