File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed
Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -5,27 +5,37 @@ INCDEPS= include/segtree.hpp include/sparsetable.hpp include/benderrmq.hp
55 include/phrase_map.hpp include/suggest.hpp include/types.hpp \
66 include/utils.hpp include/httpserver.hpp
77INCDIRS = -I . -I deps
8- OBJDEPS = src/httpserver.o deps/libuv/libuv.a deps/http-parser/http_parser.o
8+ OBJDEPS = src/httpserver.o deps/libuv/libuv.a
99
10- all : CFLAGS += -O2 -DNDEBUG
10+ ifeq "$(findstring debug,$(MAKECMDGOALS ) ) " ""
11+ OBJDEPS += deps/http-parser/http_parser.o
12+ else
13+ OBJDEPS += deps/http-parser/http_parser_g.o
14+ endif
15+
16+ .PHONY : all clean debug test perf
17+
18+ all : CFLAGS += -O2 -DNDEBUG
1119all : CXXFLAGS += -O2 -DNDEBUG
1220all : targets
1321
14- debug : CFLAGS += -g
22+ debug : CFLAGS += -g
1523debug : CXXFLAGS += -g
1624debug : targets
1725
1826targets : lib-face
1927
2028lib-face : src/main.cpp $(OBJDEPS ) $(INCDEPS )
21- $(CXX ) -o lib-face src/main.cpp $(OBJDEPS ) \
22- $(INCDIRS ) $(CXXFLAGS ) $(LINKFLAGS )
29+ $(CXX ) -o lib-face src/main.cpp $(OBJDEPS ) $(INCDIRS ) $(CXXFLAGS ) $(LINKFLAGS )
2330
2431src/httpserver.o : src/httpserver.cpp include/httpserver.hpp
2532 $(CXX ) -o src/httpserver.o -c src/httpserver.cpp $(INCDIRS )
2633
2734deps/libuv/libuv.a :
28- $(MAKE ) -C deps/libuv
35+ $(MAKE ) -C deps/libuv $(HPFLAGS )
36+
37+ deps/http-parser/http_parser_g.o :
38+ $(MAKE ) -C deps/http-parser http_parser_g.o
2939
3040deps/http-parser/http_parser.o :
3141 $(MAKE ) -C deps/http-parser http_parser.o
You can’t perform that action at this time.
0 commit comments