summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-10-09 13:24:33 -0700
committerPixel <pixel@nobis-crew.org>2011-10-09 13:24:33 -0700
commit74adacf6ec1de10b623112605b5d9610163522ec (patch)
tree8a2d283d7bdc5eacc347dc00837f5f1108d86f81
parent2367226978def1b3ab9d0a64996b1b938a5b27f2 (diff)
Adding libev.
-rw-r--r--.gitmodules3
-rw-r--r--Makefile14
m---------libev0
-rw-r--r--linux-config.h22
4 files changed, 34 insertions, 5 deletions
diff --git a/.gitmodules b/.gitmodules
index 1ef9305..d9dd7a4 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,3 +4,6 @@
[submodule "libeio"]
path = libeio
url = git.grumpycoder.net:/pub/repo.git/libeio
+[submodule "libev"]
+ path = libev
+ url = git.grumpycoder.net:/pub/repo.git/libev
diff --git a/Makefile b/Makefile
index a5463d3..5d0ed2b 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ LD = g++
AS = gcc -c
AR = ar rcs
-CPPFLAGS += -DPIC -fPIC
+CPPFLAGS += -fPIC
LDFLAGS += -fPIC
ifeq ($(DEBUG),)
CPPFLAGS += -O3
@@ -21,7 +21,7 @@ CPPFLAGS += -g
LDFLAGS += -g
endif
-INCLUDES = includes libcoro libeio
+INCLUDES = includes libcoro libeio libev
ifeq ($(SYSTEM),Darwin)
LIBS += pthread
@@ -53,7 +53,7 @@ CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
LDFLAGS += $(ARCH_FLAGS) $(addprefix -l, $(LIBS))
vpath %.cc src:tests
-vpath %.c libcoro:libeio
+vpath %.c libcoro:libeio:libev
BALAU_SOURCES = \
BString.cc \
@@ -66,6 +66,10 @@ TaskMan.cc \
LIBCORO_SOURCES = \
coro.c \
+LIBEV_SOURCES = \
+ev.c \
+event.c \
+
LIBEIO_SOURCES = \
eio.c \
@@ -76,9 +80,9 @@ test-Tasks.cc \
LIB = libBalau.a
-BALAU_OBJECTS = $(addsuffix .o, $(notdir $(basename $(BALAU_SOURCES) $(LIBCORO_SOURCES))))
+BALAU_OBJECTS = $(addsuffix .o, $(notdir $(basename $(BALAU_SOURCES) $(LIBCORO_SOURCES) $(LIBEIO_SOURCES) $(LIBEV_SOURCES))))
-WHOLE_SOURCES = $(BALAU_SOURCES) $(LIBCORO_SOURCES) $(LIBEIO_SOURCES) $(TEST_SOURCES)
+WHOLE_SOURCES = $(BALAU_SOURCES) $(LIBCORO_SOURCES) $(LIBEIO_SOURCES) $(LIBEV_SOURCES) $(TEST_SOURCES)
TESTS = $(addsuffix .bin, $(notdir $(basename $(TEST_SOURCES))))
ALL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(WHOLE_SOURCES))))
diff --git a/libev b/libev
new file mode 160000
+Subproject 71c4c2467848e78e6b7098bbcb4ac30ce62a40a
diff --git a/linux-config.h b/linux-config.h
index 4a0bf0b..10e8bee 100644
--- a/linux-config.h
+++ b/linux-config.h
@@ -1,9 +1,15 @@
+#define PIC 1
+
#define STDC_HEADERS 1
#define WORDS_LITTLEENDIAN 1
#define CORO_ASM 1
#define _FILE_OFFSET_BITS 64
#define EMBED_LIBEIO
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#endif
+
/* libeio config */
#define HAVE_FALLOCATE 1
#define HAVE_FDATASYNC 1
@@ -18,3 +24,19 @@
#define HAVE_SYS_SYNCFS 1
#define HAVE_SYS_SYSCALL_H 1
#define HAVE_UTIMES 1
+
+/* libev config */
+#define HAVE_CLOCK_SYSCALL 1
+#define HAVE_EPOLL_CTL 1
+#define HAVE_EVENTFD 1
+#define HAVE_FLOOR 1
+#define HAVE_INOTIFY_INIT 1
+#define HAVE_NANOSLEEP 1
+#define HAVE_POLL 1
+#define HAVE_POLL_H 1
+#define HAVE_SELECT 1
+#define HAVE_SIGNALFD 1
+#define HAVE_SYS_EPOLL_H 1
+#define HAVE_SYS_INOTIFY_H 1
+#define HAVE_SYS_SELECT_H 1
+#define HAVE_SYS_SIGNALFD_H 1