Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CXXFLAGS= -Wall $(COPT) -D_FILE_OFFSET_BITS=64
LINKFLAGS= -lm -lrt -pthread
LINKFLAGS= -lm -pthread
INCDEPS= include/segtree.hpp include/sparsetable.hpp include/benderrmq.hpp \
include/phrase_map.hpp include/suggest.hpp include/types.hpp \
include/utils.hpp include/httpserver.hpp
Expand All @@ -8,6 +8,14 @@ OBJDEPS= src/httpserver.o deps/libuv/libuv.a
HTTPSERVERDEPS= src/httpserver.cpp include/httpserver.hpp include/utils.hpp \
include/types.hpp

UNAME := $(shell uname)
ifeq ($(UNAME), Darwin)
CXXFLAGS += -DNORT
LINKFLAGS += -framework CoreFoundation -framework CoreServices
else
LINKFLAGS += -lrt
endif

ifeq "$(findstring debug,$(MAKECMDGOALS))" ""
OBJDEPS += deps/http-parser/http_parser.o
else
Expand Down