2009-02-16 01:34:45 +01:00
|
|
|
EVDIR=$(HOME)/local/libev
|
|
|
|
V8INC = $(HOME)/src/v8/include
|
|
|
|
V8LIB = $(HOME)/src/v8/libv8.a
|
|
|
|
|
|
|
|
CFLAGS = -g -I$(V8INC) -Ideps/oi -DHAVE_GNUTLS=0 -Ideps/ebb
|
2009-02-20 17:06:07 +01:00
|
|
|
LDFLAGS = -lev -pthread #-lefence
|
2009-02-16 01:34:45 +01:00
|
|
|
|
|
|
|
ifdef EVDIR
|
|
|
|
CFLAGS += -I$(EVDIR)/include
|
|
|
|
LDFLAGS += -L$(EVDIR)/lib
|
|
|
|
endif
|
|
|
|
|
2009-02-22 17:46:11 +01:00
|
|
|
server: js_http_request_processor.o server.o oi_socket.o ebb_request_parser.o oi_buf.o
|
|
|
|
g++ -o server $^ $(LDFLAGS) $(V8LIB)
|
2009-02-16 01:34:45 +01:00
|
|
|
|
|
|
|
server.o: server.cc
|
2009-02-20 16:34:18 +01:00
|
|
|
g++ $(CFLAGS) -c $<
|
2009-02-20 17:06:07 +01:00
|
|
|
|
|
|
|
js_http_request_processor.o: js_http_request_processor.cc
|
|
|
|
g++ $(CFLAGS) -c $<
|
2009-02-16 01:34:45 +01:00
|
|
|
|
|
|
|
ebb_request_parser.o: ebb_request_parser.c deps/ebb/ebb_request_parser.h
|
2009-02-22 17:46:11 +01:00
|
|
|
g++ $(CFLAGS) -c $<
|
2009-02-16 01:34:45 +01:00
|
|
|
|
|
|
|
ebb_request_parser.c: deps/ebb/ebb_request_parser.rl
|
|
|
|
ragel -s -G2 $< -o $@
|
|
|
|
|
|
|
|
oi_socket.o: deps/oi/oi_socket.c deps/oi/oi_socket.h
|
2009-02-20 16:34:18 +01:00
|
|
|
gcc $(CFLAGS) -c $<
|
2009-02-16 01:34:45 +01:00
|
|
|
|
2009-02-22 17:46:11 +01:00
|
|
|
oi_buf.o: deps/oi/oi_buf.c deps/oi/oi_buf.h
|
|
|
|
gcc $(CFLAGS) -c $<
|
|
|
|
|
2009-02-16 01:34:45 +01:00
|
|
|
clean:
|
2009-02-20 16:34:18 +01:00
|
|
|
rm -f ebb_request_parser.c
|
2009-02-16 01:34:45 +01:00
|
|
|
rm -f *.o
|
|
|
|
rm -f server
|
|
|
|
|
|
|
|
.PHONY: clean test
|