Fix MinGW build
Allow `make all` work under MinGW. Remove references to eio for MinGW. Fixes #170 Fixes #171
This commit is contained in:
parent
b89f4f34a4
commit
30ca028196
2
Makefile
2
Makefile
@ -80,7 +80,7 @@ endif
|
|||||||
TESTS=test/echo-server.c test/test-*.c
|
TESTS=test/echo-server.c test/test-*.c
|
||||||
BENCHMARKS=test/echo-server.c test/dns-server.c test/benchmark-*.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
|
$(CARES_OBJS): %.o: %.c
|
||||||
$(CC) -o $*.o -c $(CFLAGS) $(CPPFLAGS) $< -DHAVE_CONFIG_H
|
$(CC) -o $*.o -c $(CFLAGS) $(CPPFLAGS) $< -DHAVE_CONFIG_H
|
||||||
|
|||||||
@ -36,25 +36,19 @@ RUNNER_LINKFLAGS=$(LINKFLAGS)
|
|||||||
RUNNER_LIBS=-lws2_32
|
RUNNER_LIBS=-lws2_32
|
||||||
RUNNER_SRC=test/runner-win.c
|
RUNNER_SRC=test/runner-win.c
|
||||||
|
|
||||||
uv.a: $(WIN_OBJS) 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 src/uv-eio.o src/eio/eio.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
|
src/win/%.o: src/win/%.c src/win/internal.h
|
||||||
$(CC) $(CFLAGS) -o $@ -c $<
|
$(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
|
$(CC) $(CFLAGS) -c src/uv-common.c -o src/uv-common.o
|
||||||
|
|
||||||
EIO_CPPFLAGS += $(CPPFLAGS)
|
EIO_CPPFLAGS += $(CPPFLAGS)
|
||||||
EIO_CPPFLAGS += -DEIO_STACKSIZE=65536
|
EIO_CPPFLAGS += -DEIO_STACKSIZE=65536
|
||||||
EIO_CPPFLAGS += -D_GNU_SOURCE
|
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:
|
clean-platform:
|
||||||
-rm -f src/ares/*.o
|
-rm -f src/ares/*.o
|
||||||
-rm -f src/eio/*.o
|
-rm -f src/eio/*.o
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user