Implement the HTTP plugin

Ended up including Joyent's http-parser library.
This commit is contained in:
2014-09-21 00:58:19 +02:00
parent 2b74a18833
commit 47aaedd26a
6 changed files with 113 additions and 8 deletions

View File

@@ -5,6 +5,7 @@ CFLAGS = -std=c99 -Wall -Wextra -Wno-unused-function -ggdb
# -lpthread is only there for debugging (gdb & errno)
# -lrt is only for glibc < 2.17
LDFLAGS = `pkg-config --libs libssl jansson` -lpthread -lrt -ldl -lcurses
LDFLAGS_PLUGIN = $(LDFLAGS) -shared -fPIC
.PHONY: all clean
.SUFFIXES:
@@ -23,4 +24,8 @@ ponymap.1: ponymap
help2man -No $@ ./$<
plugins/%.so: plugins/%.c utils.c plugin-api.h
$(CC) $< -o $@ $(CFLAGS) $(LDFLAGS) -shared -fPIC
$(CC) $< -o $@ $(CFLAGS) $(LDFLAGS_PLUGIN)
plugins/http.so: plugins/http.c utils.c plugin-api.h \
http-parser/http_parser.c http-parser/http_parser.h
$(CC) $< http-parser/http_parser.c -o $@ $(CFLAGS) $(LDFLAGS_PLUGIN)