1CC := cc
2CFLAGS := -O3 -Wall
3# To make the code about 6% faster:
4# CFLAGS += -fwhole-program --combine
5CPPFLAGS := -I$(HOME)/hg/http-parser
6
7all: c-http
8
9c-http: rfc2616.c http_parser.c
10	$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $^
11
12clean:
13	rm -f *.hi *.o c-http
14
15http_parser.c: http_parser.h
16	curl -O https://raw.githubusercontent.com/joyent/http-parser/master/http_parser.c
17
18http_parser.h:
19	curl -O https://raw.githubusercontent.com/joyent/http-parser/master/http_parser.h
20