diff --git a/Makefile b/Makefile index 5642aef3..aaeb604e 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,15 @@ test/echo-server: test/echo-server.c ol.a - gcc -o test/echo-server test/echo-server.c ol.a + $(CC) -o test/echo-server test/echo-server.c ol.a -lm -ol.a: ol-unix.o - ar rcs ol.a ol-unix.o +ol.a: ol-unix.o ev/ev.o + ar rcs ol.a ol-unix.o ev/ev.o ol-unix.o: ol-unix.c ol.h ol-unix.h - gcc -c ol-unix.c -o ol-unix.o -lm + $(CC) -c ol-unix.c -o ol-unix.o -lm -ev/libev.a: ol-unix.c ol.h ol-unix.h - gcc -c ol-unix.c -o ol-unix.o -lm +ev/ev.o: ev/config.h ev/ev.c + $(MAKE) -C ev + +ev/config.h: + cd ev && ./configure diff --git a/ol-unix.c b/ol-unix.c index 9e39660f..0ad0c325 100644 --- a/ol-unix.c +++ b/ol-unix.c @@ -1,8 +1,8 @@ #include "ol.h" -#define EV_STANDALONE 1 -#define EV_MULTIPLICITY 0 -#include "ev/ev.c" +#include +#include +#include void ol_tcp_io(EV_P_ ev_io* watcher, int revents); diff --git a/test/echo-server.c b/test/echo-server.c index b29ae48a..1d12ce4c 100644 --- a/test/echo-server.c +++ b/test/echo-server.c @@ -1,5 +1,6 @@ #include "../ol.h" #include +#include #define BUFSIZE 1024