Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Mostly compiling

  • Loading branch information...
commit 6b0d4fa3725beea11ca8c0e43b0fd3169407d15e 1 parent 151e2a8
@ry ry authored
Showing with 13 additions and 9 deletions.
  1. +9 −6 Makefile
  2. +3 −3 ol-unix.c
  3. +1 −0  test/echo-server.c
View
15 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
View
6 ol-unix.c
@@ -1,8 +1,8 @@
#include "ol.h"
-#define EV_STANDALONE 1
-#define EV_MULTIPLICITY 0
-#include "ev/ev.c"
+#include <stdlib.h>
+#include <errno.h>
+#include <assert.h>
void ol_tcp_io(EV_P_ ev_io* watcher, int revents);
View
1  test/echo-server.c
@@ -1,5 +1,6 @@
#include "../ol.h"
#include <stdio.h>
+#include <stdlib.h>
#define BUFSIZE 1024
Please sign in to comment.
Something went wrong with that request. Please try again.