Add libuv examples

This commit is contained in:
Juraj Michalek
2012-11-25 19:00:56 +01:00
parent c242d92abf
commit d4fa1ef6aa
5 changed files with 128 additions and 2 deletions

13
libuv/hello/Makefile Normal file
View File

@@ -0,0 +1,13 @@
PACKAGE = hello
OBJECTS = hello.o
CFLAGS = -I/usr/local/include/uv
LDADD = -luv
hello: $(OBJECTS)
${CC} -o ${PACKAGE} ${OBJECTS} ${LDADD}
.c.o:
${CC} ${CFLAGS} -c $<
clean:
rm -f hello *.o

11
libuv/hello/hello.c Normal file
View File

@@ -0,0 +1,11 @@
#include <stdio.h>
#include <uv.h>
int main() {
uv_loop_t *loop = uv_loop_new();
printf("Now quitting.\n");
uv_run(loop);
return 0;
}